Skip to content

Commit 913f84e

Browse files
authored
Merge pull request #1 from boettiger-lab/patch/duckdb_issue
fixed error with reading parquet file
2 parents 1d924fc + a4f3b3e commit 913f84e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def get_geom(tbl):
356356
engine = create_engine(db_uri) #connect_args={'read_only': True})
357357
con = engine.connect()
358358
con.execute("install spatial; load spatial;")
359-
con.execute(f"create or replace table protected as select *, st_geomfromwkb(geom) as geometry from read_parquet('{parquet}');").fetchall()
359+
con.execute(f"create or replace table protected as select *, geom as geometry from read_parquet('{parquet}');").fetchall()
360360
db = SQLDatabase(engine, view_support=True)
361361

362362
from langchain_openai import ChatOpenAI

0 commit comments

Comments
 (0)