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

Uses tokenized query returned by python-sqlparse and generates query metadata

Results 102 sql-metadata issues
Sort by recently updated
recently updated
newest added

Could a new token of is_aggregate_function be added to identify keywords such as count, sum etc?

enhancement

Parser('SELECT C1, C2 INTO VAR1, VAR2 FROM TEST_TABLE').tables) is returning VAR1 and VAR2 as table names ['VAR1', 'VAR2', 'TEST_TABLE'] Tested @VAR1, @VAR2 and :VAR1, :VAR2 (Oracle bind variable names) and...

The sql below works as expected select q.hx_id , q.text from ( select prod_code, s.* from testdb.test_table s inner join testdb.test_table2 p on s.s1_fk=p.p1_sk ) q But the following SQL...

Example : output to identify columns is not correct for below query SELECT Calendar_year_lookup.Yr, {fn concat('Q',Calendar_year_lookup.Qtr)}, Outlet_Lookup.State, Article_lookup.Family_name, sum(Shop_facts.Amount_sold), sum(Shop_facts.Quantity_sold), sum(Shop_facts.Margin) FROM Calendar_year_lookup, Outlet_Lookup, Article_lookup, Shop_facts WHERE ( Outlet_Lookup.Shop_id=Shop_facts.Shop_id )...

bug

I am having issues with getting `each table` and `each field` this is my sql, and I am having no idea how to scrap all of the tables. I could...

Requesting adding feature like extracting tables join relationships , joining columns, join types from the given sql query

Hi, Parsing this statement: `Update a SET b=1 FROM schema1.testtable as a;` Gives "a" as both alias and table. It should identify a as alias only. Fixed using this workaround,...

Firstly thanks for your tool, it helps a lot. I found some bugs when I used it, hope it could help improve this tool. Here is the case of the...

I am back! You folks do such good work, I have to keep pushing on your product. Here is the issue, I wrote the following 3 test: ```python def test_create_table():...

Within Postgres, it's possible (and sometimes necessary) to put double quotes around table & column names. This causes undesired behavior within sql_metadata: - `get_query_columns` won't find any columns, even if...

enhancement
Postgres