Skip to content

Commit

Permalink
Manually enforce column order
Browse files Browse the repository at this point in the history
  • Loading branch information
sultaniman committed Mar 21, 2024
1 parent 1d27a22 commit b8208ae
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dlt/helpers/streamlit_app/blocks/table_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

0 comments on commit b8208ae

Please sign in to comment.