I’m getting the following error when attempting to start a local instance of the server.
The code to run looks like this:
from dask.distributed import LocalCluster, Client
from dask_sql import Context, run_server
if __name__ == "__main__":
cluster = LocalCluster(
n_workers=2,
memory_limit='3GiB',
)
print(cluster.dashboard_link)
print(cluster.scheduler_address)
local_client = Client(cluster)
data_locations = {
# "table_name":"location",
"table1":"C:/...../table1.parquet",
"table2":"D:/...../table2.parquet",
"table3":"C:/...../table3.parquet",}
c = Context()
print(c.DEFAULT_CATALOG_NAME)
print(c.DEFAULT_SCHEMA_NAME)
for table_name, path in data_locations.items():
c.create_table(table_name=table_name,input_table=path)
# c.run_server(client = local_client)
run_server(context = c, client = local_client, )
The strange thing is that it works when I put the same code in a notebook and run it.
Not sure where I am going wrong on this. Any help would be greatly appreciated!