Spaces:
Runtime error
Runtime error
Mustehson
commited on
Commit
Β·
5f1dc64
1
Parent(s):
6e47eb5
Fix Query for Schemas
Browse files
app.py
CHANGED
|
@@ -60,7 +60,6 @@ def update_tables(schema_name):
|
|
| 60 |
|
| 61 |
# Get Schema
|
| 62 |
def get_table_schema(table):
|
| 63 |
-
conn.execute(f"SELECT * FROM '{table}' LIMIT 1;")
|
| 64 |
result = conn.sql(f"SELECT sql FROM duckdb_tables() where table_name ='{table}';").df()
|
| 65 |
ddl_create = result.iloc[0,0]
|
| 66 |
return ddl_create
|
|
|
|
| 60 |
|
| 61 |
# Get Schema
|
| 62 |
def get_table_schema(table):
|
|
|
|
| 63 |
result = conn.sql(f"SELECT sql FROM duckdb_tables() where table_name ='{table}';").df()
|
| 64 |
ddl_create = result.iloc[0,0]
|
| 65 |
return ddl_create
|