sql-metadata icon indicating copy to clipboard operation
sql-metadata copied to clipboard

Feature Request: correct handling of queries on Parquet file (using OPENROWSET)

Open aarwurzer2 opened this issue 1 year ago • 0 comments

Currently, the querying of Parquet files is not handled correctly. Columns are interpreted correctly, just not the tables part (as expected). Following an example of a Parquet query, using OPENROWSET:

SELECT q.MY_FIELD01
  FROM OPENROWSET (BULK '/DATA_STORE1/1/data/date=2022-12-25/*'
                  ,DATA_SOURCE = 'parquet-datasource'
                  ,FORMAT = 'PARQUET') q
WHERE q.MY_FIELD02 >= 'value';

The current output is as follows:

Key Value(s)
Table names OPENROWSET
Table names BULK
Table names DATA_SOURCE
Table names FORMAT
Column names q.MY_FIELD01
Column names q.MY_FIELD02

But, as you might have guessed, OPENROWSET, BULK, DATA_SOURCE and FORMAT are actually all keywords. For Table names the correct output should have been /DATA_STORE1/1/data/date=2022-12-25/*

aarwurzer2 avatar Jul 10 '24 16:07 aarwurzer2