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

Hi there, I have 2 sqls: ``` SELECT aa FROM (SELECT bb FROM bbb group by bb) as a, `omg` ``` Key | Value(s) -- | -- Table names |...

obviously there'd be a lot more work, but i wanted to kind of demo how much easier it will be to do things

Query to reproduce: ```python parsed = Parser(""" with cte_one as ( select table_one.* from table_one ) select cte_one.column_one from cte_one """) ``` Above code will fail when getting `parsed.columns`. But...

Query to reproduce: ```python parsed = Parser(""" with cte_one as ( select table_one.* from table_one ) select cte_one.column_one from cte_one """) ``` Above code will fail when getting `parsed.columns`. But...

Hi, I would like to thank you for this tool, it's awesome! Although, I found a bug. I left a comment on [another issue](https://github.com/macbre/sql-metadata/issues/259) to understand what the issue is...

bug

Hi, using `parser.columns_dict` I can get columns in WHERE, ORDER BY clauses, but also I'd like to get values too. For instance, let`s say I have a query like ```sql...

enhancement

```python sql_stat = """ with a as (select id, a from tbl1 ), with b as (select id, b from tbl2) ( select a.id, a.a + b.b as t from...

ttt =""" select * from ( (select a1,a2 from ta1 ) tt1 left join (select b1,b2 from tb1 ) tt2 on tt1.a1= tt2.b1) tt3 """ Parser(ttt).columns ['*', 'a1', 'a2', 'b1',...

Ciao, I’m playing with the library to get the list of all fields accessed by a given query, but I’m getting inconsistent results based on the complexity of the SQL...

Hi, the library seem to have issue parsing query with the mssql keyword top , whenever you do so the first column is found to be an alias but it's...

bug
SQL Server