Obtain Fully Qualified Columns and Tables Lists
Hi Macbre,
First off all I would like to congratule you and say thank you for your work and sharing it with the community.
I would like to know if it is possible for you to create two new methods in sql_metadata on class Parser that would provide Fully Qualified distinct Lists of Columns and Tables present in SQL Query.
Example:
The following SQL Query:
UPDATE SchemaA.TableA SET ColumnA1 = SYSDATE WHERE ColumnA1 IS NULL AND EXISTS(SELECT ColumnB1 FROM SchemaB.TableB AliasB WHERE TableA.ColumnA2 = AliasB .ColumnB2 )
Would return for each of the new Fully Qualified methods:
Fully_Qualified_Distinct_Columns_List = ['SchemaA.TableA.ColumnA1 ', 'SchemaB.TableB.ColumnB1 ', 'SchemaA.TableA.ColumnA2 ', 'SchemaB.TableB.ColumnB2 ']
Fully_Qualified_Distinct_Tables_List = ['SchemaA.TableA', 'SchemaB.TableB']
If Schema information is not present in SQL Query then that part would me omitted in the output of the new Fully Qualified methods.
Is it possible for you to create these two new methods? They will be very helpful to parse any SQL Query and as result get the Full Qualified List of distinct columns and table present.
Thanks in advance for your support.
Best Regards, Fernando Moreira