Skip to content

Regression: Can no longer use FORMAT PARQUET in COPY command #9713

@alamb

Description

@alamb

Describe the bug

#9604 from @metesynnada rationalized the COPY syntax to match CREATE EXTERNAL TABLE syntax. For example

- COPY (SELECT * FROM 'hits.parquet' LIMIT 10) TO 'clickbench_hits_10.parquet' (FORMAT PARQUET);
+ COPY (SELECT * FROM 'hits.parquet' LIMIT 10) TO 'clickbench_hits_10.parquet' STORED AS PARQUET;

However, this also means the syntax is no longer compatible with duckdb

To Reproduce

❯ COPY (select * from (values (1))) to '/tmp/foo.parquet' OPTIONS (format parquet);
Invalid or Unsupported Configuration: could not find config namespace for key "format"```

Expected behavior

I would like to support the former syntax as well as the new one

So both

❯ COPY (select * from (values (1))) to '/tmp/foo.parquet' OPTIONS (format parquet);
Invalid or Unsupported Configuration: could not find config namespace for key "format"```

And 

```sql
❯ COPY (select * from (values (1))) to '/tmp/foo.parquet' STORED AS PARQUET;
+-------+
| count |
+-------+
| 1     |
+-------+

would work

Additional context

No response

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions