dask-sql icon indicating copy to clipboard operation
dask-sql copied to clipboard

[ENH] Support executing multiple, semicolon delimited statements sequentially

Open randerzander opened this issue 3 years ago • 0 comments

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.

randerzander avatar Jun 15 '22 19:06 randerzander