From b8208ae5adeead58da11a932491656925a866429 Mon Sep 17 00:00:00 2001 From: Sultan Iman Date: Thu, 21 Mar 2024 11:35:36 +0100 Subject: [PATCH] Manually enforce column order --- dlt/helpers/streamlit_app/blocks/table_hints.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlt/helpers/streamlit_app/blocks/table_hints.py b/dlt/helpers/streamlit_app/blocks/table_hints.py index 3c2d79bf19..aefab952e5 100644 --- a/dlt/helpers/streamlit_app/blocks/table_hints.py +++ b/dlt/helpers/streamlit_app/blocks/table_hints.py @@ -65,8 +65,16 @@ def list_table_hints(pipeline: dlt.Pipeline, tables: List[TTableSchema]) -> None # table schema contains various hints (like clustering or partition options) # that we do not want to show in basic view def essentials_f(c: Any) -> Dict[str, Any]: - return {k: v for k, v in c.items() if k in ["name", "data_type", "nullable"]} + essentials: Dict[str, Any] = {} + for k, v in c.items(): + if k in ["name", "data_type", "nullable"]: + essentials[k] = v - st.table(map(essentials_f, table["columns"].values())) + return { + "name": essentials["name"], + "data_type": essentials["data_type"], + "nullable": essentials["nullable"], + } + st.table(map(essentials_f, table["columns"].values())) show_data_button(pipeline, table["name"])