Home > database >  How do I parse a custom SQL query from a DataFrame in Python?
How do I parse a custom SQL query from a DataFrame in Python?

Time:10-12

I'm pulling custom SQL queries from the Tableau metadata and trying to pull out only the schema & table names from the dataframe. I'm looking for something that will help me pull out only the text between "from" and "where", etc.

CodePudding user response:

pip install sql-metadata

This allows you to select columns and tables from SQL queries

https://github.com/macbre/sql-metadata#readme

  • Related