glaredb icon indicating copy to clipboard operation
glaredb copied to clipboard

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

Open greyscaled opened this issue 1 year ago • 3 comments

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

greyscaled avatar Jan 26 '24 16:01 greyscaled

@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

universalmind303 avatar Jan 31 '24 21:01 universalmind303

it works now, idk what fixed it 🤷🏻

greyscaled avatar Jan 31 '24 21:01 greyscaled

Need a test for this, then will close

scsmithr avatar Feb 01 '24 15:02 scsmithr