dask-sql
dask-sql copied to clipboard
[ENH] Support executing multiple, semicolon delimited statements sequentially
I often inherit existing SQL files which contain a series of queries/statements that should be executed one after the other.
It's fairly easy to do something like:
with open("my_sql.txt") as fp:
sql = fp.read()
for statement in sql.split(";"):
c.sql(statement)
But it'd be nice to have a builtin sequential execution of all statements in a single call.
I think an assumption might have to be that only the last statement actually returns a result. Or, that we added some way to return a list of result DAGs/DFs.