Skip to main content
Version: devel

dlt.common.schema.typing

C_DLT_ID​

unique id of current row

C_DLT_LOAD_ID​

load id to identify records loaded in a single load package

C_DLT_LOADS_TABLE_LOAD_ID​

load id column in the table {LOADS_TABLE_NAME}. Meant to be joined with {C_DLT_LOAD_ID} of data tables

C_CHILD_PARENT_REF_LABEL​

Label of the implicit TTableReference between a child table and its parent table

C_DESCENDANT_ROOT_REF_LABEL​

Label of the implicit TTableReference between a descendant table and its root table

C_ROOT_LOAD_REF_LABEL​

Label of the implicit TTableReference between a root table and the _dlt_loads table

C_VERSION_SCHEMA_VERSION_LABEL​

Label of the implicit TTableReference between {LOAD_TABLE_NAME} and {VERSION_TABLE_NAME} for schema version.

C_VERSION_SCHEMA_NAME_LABEL​

Label of the implicit TTableReference between {LOAD_TABLE_NAME} and {VERSION_TABLE_NAME} for schema name.

TColumnProp​

All known properties of the column, including name, data type info and hints

TColumnHint​

Known hints of a column

TColumnSchemaBase Objects​

class TColumnSchemaBase(TColumnType, TColumnProcessingHints)

View source on GitHub

TypedDict that defines basic properties of a column: name, data type and nullable

TColumnSchema Objects​

class TColumnSchema(TColumnSchemaBase)

View source on GitHub

TypedDict that defines additional column hints

TTableSchemaColumns​

A mapping from column name to column schema, typically part of a table schema

TSchemaContractDict Objects​

class TSchemaContractDict(TypedDict)

View source on GitHub

TypedDict defining the schema update settings

UPSERT_MERGE_STRATEGIES​

Strategies that merge by primary key and share the upsert options.

MERGE_STRATEGY_OPTIONS​

Merge strategy options and the strategies that support them.

MERGE_DISPOSITION_HINTS​

Table hints that store the keys of the merge write disposition dict. The column names in the dict, like row_version_column_name, mark their columns with column hints instead.

DEFAULT_VALIDITY_COLUMN_NAMES​

Default values for validity column names used in scd2 merge strategy.

TMergeDispositionDict Objects​

class TMergeDispositionDict(TWriteDispositionDict)

View source on GitHub

strategy​

The destination picks its default strategy when not set.

TSourceFilterDict Objects​

class TSourceFilterDict(TypedDict)

View source on GitHub

source_filter​

SQL condition that selects the merge source from the loaded rows. dlt discards the other loaded rows.

TDestinationScopeDict Objects​

class TDestinationScopeDict(TypedDict)

View source on GitHub

destination_scope​

SQL condition that selects the destination rows that the merge can delete or retire.

TScd2StrategyDict Objects​

class TScd2StrategyDict(TWriteDispositionDict, TSourceFilterDict,
TDestinationScopeDict)

View source on GitHub

active_record_timestamp​

None marks active records with NULL.

boundary_timestamp​

None resets the boundary to the load package creation time.

TUpsertOptionsDict Objects​

class TUpsertOptionsDict(TypedDict)

View source on GitHub

skip_unchanged_rows​

If True, dlt does not update destination records that equal their loaded record. Defaults to False.

row_version_column_name​

Column that changes when a record changes. With skip_unchanged_rows, dlt compares only this column to detect changed records.

TReferenceCardinality​

Represents cardinality between column (left) and referenced_column (right)

Note that cardinality is not symmetric. For example:

  • Author, 0 to many, Book an author can have 0 to many book
  • Book, 1 to 1, Author a book must have exactly 1 author

The statement (Author, 0 to many, Book) doesn't imply (Book, many to 0, Author).

_TTableReferenceBase Objects​

class _TTableReferenceBase(TypedDict)

View source on GitHub

Describes a reference to another table's columns. columns corresponds to the referenced_columns in the referenced table and their order should match.

label​

Text providing semantic information about the reference.

For example, the label "liked" describe the relationship between user and post (user.id, "liked", post.id)

cardinality​

Cardinality of the relationship between table.column (left) and referenced_table.referenced_column (right).

columns​

Name of the column(s) from table

referenced_table​

Name of the referenced table

referenced_columns​

Name of the columns(s) from referenced_table

TTableReferenceInline Objects​

class TTableReferenceInline(_TTableReferenceBase, TypedDict)

View source on GitHub

table​

Name of the table. When TTableReference is defined on a TTableSchema (i.e., "inline reference"), the table value is determined by TTableSchema["name"]

TTableReferenceStandalone Objects​

class TTableReferenceStandalone(_TTableReferenceBase, TypedDict)

View source on GitHub

table​

Name of the table. When TTableReference is defined on a TTableSchema (i.e., "inline reference"), the table value is determined by TTableSchema["name"]

TTableSchema Objects​

class TTableSchema(_TTableSchemaBase)

View source on GitHub

TypedDict that defines properties of a table

TColumnDefaultHint​

Allows using not_null in default hints setting section

TStoredSchema Objects​

class TStoredSchema(TypedDict)

View source on GitHub

TypeDict defining the schema representation in storage

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.