dlt._workspace.helpers.dashboard.utils.schema
Schema introspection helpers: table lists, column lists, schema retrieval, and resource state.
schemas_to_table_items
def schemas_to_table_items(schemas: Iterable[Schema],
default_schema_name: str) -> List[TNameValueItem]
Convert a list of schemas to name/value display items, with default schema first.
create_table_list
def create_table_list(c: DashboardConfiguration,
pipeline: dlt.Pipeline,
selected_schema_name: str = None,
show_internals: bool = False,
show_child_tables: bool = True,
show_row_counts: bool = False) -> List[TTableListItem]
Create a list of tables for the pipeline, optionally including internals, child tables, and row counts.
create_column_list
def create_column_list(
c: DashboardConfiguration,
pipeline: dlt.Pipeline,
table_name: str,
selected_schema_name: str = None,
show_internals: bool = False,
show_type_hints: bool = True,
show_other_hints: bool = False,
show_custom_hints: bool = False) -> List[Dict[str, Any]]
Create a list of columns for a table, with configurable hint visibility.
get_source_and_resource_state_for_table
def get_source_and_resource_state_for_table(
table: TTableSchema, pipeline: dlt.Pipeline,
schema_name: str) -> Tuple[str, DictStrAny, DictStrAny]
Return (resource_name, source_state, resource_state) for the resource that created the given table.
get_schema_by_version
def get_schema_by_version(pipeline: dlt.Pipeline, version_hash: str) -> Schema
Retrieve a schema from the destination by its version hash (cached).
build_resource_state_widget
def build_resource_state_widget(pipeline: dlt.Pipeline, schema_name: str,
table_name: str) -> Optional[mo.Html]
Build source/resource state accordion for the given table, or None if not applicable.