Spaces:
Running
Running
Jon Solow
commited on
Commit
·
ddf7165
1
Parent(s):
2a27c15
Copy get_current_tables to dbt_data_client to remove incorrect dep path
Browse files- src/dbt_data_client.py +5 -0
- src/pages/98_Load_Data copy.py +1 -3
src/dbt_data_client.py
CHANGED
|
@@ -21,3 +21,8 @@ def run_dbt_build():
|
|
| 21 |
)
|
| 22 |
stdout, _ = process.communicate()
|
| 23 |
st.text("\n".join(stdout.decode().split("\n")[1:][:-1]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
)
|
| 22 |
stdout, _ = process.communicate()
|
| 23 |
st.text("\n".join(stdout.decode().split("\n")[1:][:-1]))
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def get_current_tables(duckdb_conn=get_db_conn()) -> list[str]:
|
| 27 |
+
current_tables_df = duckdb_conn.sql("SHOW TABLES").df()
|
| 28 |
+
return current_tables_df["name"].tolist()
|
src/pages/98_Load_Data copy.py
CHANGED
|
@@ -3,9 +3,7 @@ import streamlit as st
|
|
| 3 |
from config import DEFAULT_ICON
|
| 4 |
from shared_page import common_page_config
|
| 5 |
|
| 6 |
-
from
|
| 7 |
-
|
| 8 |
-
from dbt_data_client import get_db_conn, run_dbt_build
|
| 9 |
|
| 10 |
|
| 11 |
def get_page():
|
|
|
|
| 3 |
from config import DEFAULT_ICON
|
| 4 |
from shared_page import common_page_config
|
| 5 |
|
| 6 |
+
from dbt_data_client import get_db_conn, run_dbt_build, get_current_tables
|
|
|
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
def get_page():
|