Skip to main content
Version: 1.22.2 (latest)

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]

View source on GitHub

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]

View source on GitHub

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]]

View source on GitHub

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]

View source on GitHub

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

View source on GitHub

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]

View source on GitHub

Build source/resource state accordion for the given table, or None if not applicable.

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.