Created
May 3, 2024 19:44
-
-
Save eyaltrabelsi/b6fb0c5642f93dd8a985019950dda45b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_queries_synatx(): | |
queries = glob.glob('**/*.sql',recursive=True) | |
engine = create_engine('<COOL_CONNECTION_STR>') | |
with engine.connect() as con: | |
for query_file in queries_list: | |
with open(query_file) as f: | |
query = f.read() | |
test_query = f"Explain {query}" | |
con.execute(test_query) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment