最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

DuckDb error message when querying structure with * in SQL - Stack Overflow

programmeradmin4浏览0评论

select field.a.b from table_parquet returns a result with a structure when select field.a.b.* from table_parquet returns the following error:

SQL Error: java.sql.SQLException: Parser Error: syntax error at or near "*"

Using DbEaver with DuckDB v1.1.3 for the server and DuckDBJ 1.0 for the driver. Same behaviour from Java with

<dependency>
   <groupId>.duckdb</groupId>
   <artifactId>duckdb_jdbc\</artifactId>
   <version>1.1.3\</version>
</dependency>

The table is a view mapped on a parquet file :

create or replace view table_parquet as select * from read_parquet('C:/temp/ASM/archives/*/*/*/*.parquet', hive_partitioning = true)

Is there any way to use *?

The query select field.a.b.* from table_parquet should return all fields of the structure b

select field.a.b from table_parquet returns a result with a structure when select field.a.b.* from table_parquet returns the following error:

SQL Error: java.sql.SQLException: Parser Error: syntax error at or near "*"

Using DbEaver with DuckDB v1.1.3 for the server and DuckDBJ 1.0 for the driver. Same behaviour from Java with

<dependency>
   <groupId>.duckdb</groupId>
   <artifactId>duckdb_jdbc\</artifactId>
   <version>1.1.3\</version>
</dependency>

The table is a view mapped on a parquet file :

create or replace view table_parquet as select * from read_parquet('C:/temp/ASM/archives/*/*/*/*.parquet', hive_partitioning = true)

Is there any way to use *?

The query select field.a.b.* from table_parquet should return all fields of the structure b

Share Improve this question asked yesterday Pierre HouryPierre Houry 131 silver badge2 bronze badges New contributor Pierre Houry is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Add a comment  | 

1 Answer 1

Reset to default 1

Did you try

select unnest(field.a.b) from table_parquet

I would try it in the CLI before trying in Dbeaver. Is there a reason you are using an older duckdb version?

发布评论

评论列表(0)

  1. 暂无评论