GlareDB / glaredb

GlareDB: An analytics DBMS for distributed data
https://glaredb.com
GNU Affero General Public License v3.0
637 stars 36 forks source link

`COPY TO`: Cannot execute remote scan with a remote reference #2512

Open greyscaled opened 7 months ago

greyscaled commented 7 months ago

In the v0.8.1 REPL, I tried variations of this query:

COPY (SELECT * FROM bq.austin_bikeshare.bikeshare_trips) TO './bikeshare_trips.csv';

COPY (SELECT * FROM bq.austin_bikeshare.bikeshare_trips) TO LOCAL FORMAT csv OPTIONS ( location = './bikeshare_trips.csv');

COPY (SELECT * FROM bq.austin_bikeshare.bikeshare_trips) TO 'bikeshare_trips.csv' FORMAT csv;

All of which yielded the following error:

Error: External error: External error: External error: Execution error: Cannot execute remote scan with a remote reference

universalmind303 commented 7 months ago

@greyscaled I'm unable to reproduce this. Am I missing any steps here?

> curl https://glaredb.com/install.sh | sh
> ./glaredb                                                                                                                                                                                                 
GlareDB (v0.8.1)
Type \help for help.

> \open glaredb://<user>:<pw>@<subdomain>.remote.glaredb.com:6443/<db>
Connected to Cloud deployment (TLS enabled): <db>

> CREATE EXTERNAL DATABASE bq
::: FROM bigquery
::: OPTIONS (
::: service_account_key = '<account_key>',
::: project_id = '<project_id>',
::: );

> COPY (SELECT * FROM bq.austin_bikeshare.bikeshare_trips limit 1) TO './bikeshare_trips.csv';
Copy success
> COPY (SELECT * FROM bq.austin_bikeshare.bikeshare_trips) TO LOCAL FORMAT csv OPTIONS ( location = './bikeshare_trips.csv');
Copy success
> COPY (SELECT * FROM bq.austin_bikeshare.bikeshare_trips) TO 'bikeshare_trips.csv' FORMAT csv;
Copy success
greyscaled commented 7 months ago

it works now, idk what fixed it 🤷🏻

scsmithr commented 7 months ago

Need a test for this, then will close