You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DISABLE_DISPLAY_KEYS=false # if true, the display keys will not be shown in the frontend
6
-
EXEC_PYTHON_IN_SUBPROCESS=false # if true, the python code will be executed in a subprocess to avoid crashing the main app, but it will increase the time of response
6
+
EXEC_PYTHON_IN_SUBPROCESS=false # if true, the python code will be executed in a subprocess to avoid crashing the main app, but it will increase the time of response
7
+
8
+
# External atabase connection settings
9
+
# check https://duckdb.org/docs/stable/extensions/mysql.html and https://duckdb.org/docs/stable/extensions/postgres.html
10
+
USE_EXTERNAL_DB=false # if true, the app will use an external database instead of the one in the app
11
+
DB_NAME=mysql_db # the name to refer to this database connection
conn.execute(f"ATTACH '' AS {db_name} (TYPE {db_type});")
69
+
# result = conn.execute(f"SELECT * FROM {db_name}.information_schema.tables WHERE table_schema NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys');").fetch_df()
table_metadata_list=db.execute("SELECT database_name, schema_name, table_name, schema_name==current_schema() as is_current_schema FROM duckdb_tables() WHERE internal=False").fetchall()
conn.execute(f"ATTACH '' AS {db_name} (TYPE {db_type});")
520
+
521
+
result=conn.execute(f"SELECT * FROM {db_name}.information_schema.tables WHERE table_schema NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys');").fetch_df()
522
+
523
+
print(f"result: {result}")
524
+
525
+
result=conn.execute(f"SELECT * FROM {db_name}.sakila.actor LIMIT 10;").fetchdf()
0 commit comments