Skip to content

Commit

Permalink
enables duckdb tables across schema
Browse files Browse the repository at this point in the history
  • Loading branch information
rlancer committed Mar 6, 2024
1 parent 2781aad commit ccb8d44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/vegafusion/vegafusion/connection/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ def _replace_query_for_table(self, table_name: str):
return f"SELECT * FROM {table_name}"

def _schema_for_table(self, table_name: str):
rel = self.conn.query(f'select * from "{table_name}" limit 1')
rel = self.conn.query(f'select * from {table_name} limit 1')
return duckdb_relation_to_schema(rel)

def tables(self) -> Dict[str, pa.Schema]:
result = {}
table_names = self.conn.query(
"select table_name from information_schema.tables"
"select concat_ws('.', table_catalog, table_schema, table_name) as table_name from information_schema.tables"
).to_df()["table_name"].tolist()

for table_name in table_names:
Expand Down

0 comments on commit ccb8d44

Please sign in to comment.