sql-metadata
sql-metadata copied to clipboard
Uses tokenized query returned by python-sqlparse and generates query metadata
If I run `get_query_tables` with this string as an argument, I think only TABLE1 should be in the value it returns, and MTYPE shouldn't be there. ```sql SELECT * FROM...
Pattern to be searched when using `LIKE operator` is being detected as a columns. Code to reproduce the result, using sql_metadata==2.10.0 ``` from sql_metadata import Parser sql_string = "select *...
When the query `SELECT name from employee WHERE age > 25` is parsed, the resulting table_aliases are `{'WHERE': 'employee'}`. Code to reproduce with sql_metadata == 2.10.0 ```python import sql_metadata parser...
reproduce in 2.9.0 ``` >>> Parser("select `col1 with space` / `col2_anything` from table1;").columns ['col1 with space'] >>> Parser("select `col1 with space` / `col2_anything` from table1;").columns_aliases {'col2_anything': 'col1 with space'} >>>...
1. expected table, result where column ``` select a.pt_dept_cd ,a.sts_cls ,a.pt_no from manst a, ( select rcd_id, max(release_number) release_number from manst where pt_no = :p1 and rcd_patt_id = :p2 )...
Hello, @macbre when my query has this format it parse error tables: ```sql select 1 from t1 join t2 on t1.t2_id = nvl(t2.id, t2.uid) -- ['t1', 't2', 't2.uid'] ```
Hi, Thank you for supporting this repo. GCP BigQuery has [nested arrays](https://cloud.google.com/bigquery/docs/reference/standard-sql/arrays#flattening_arrays) that are flattened via the `UNNEST` operator. Time pending, I'd like to explore a method to add functionality...
when my query has this format it gives error: ``` create temporary table tablname as stored as ORC TBLPROPERTIES("orc.compress"="SNAPPY") as ``` ` ERROR:Parser:Not supported query type:`
Hello @macbre. I'm addressing the Attribute Errors we discussed before, but I've come across a new bug. This one appears to be related to issues with aliases and 'with' queries,...
When extracting table name like: `Parser(sql).tables` getting verbos for all not supported queries like: `Not supported query type: CREATE OR REPLACE TABLE SILVER_` How can I turn it off?