Skip to main content

loaders.merge

merge_source_into_target​

def merge_source_into_target(table_config: TableConfig,
config_manager: ConfigManager,
columns_to_exclude: list[str] = None)

Merges source data from the bronze lakehouseA place where you store both "raw" data (like files) and "organized" data (like tables). It combines the best of a File Cabinet and a Database. into the silver lakehouse.

Arguments:

  • table_config TableConfig - Configuration for the table to be merged.
  • config_manager ConfigManager - Configuration manager instance.
  • columns_to_exclude list[str], optional - Columns to exclude from the merge. Defaults to None.

load_silver_table_from_bronze​

def load_silver_table_from_bronze(table_config: TableConfig,
config_manager: ConfigManager,
columns_to_exclude: list[str] = None)

Loads the silver table directly from the bronze lakehouse without merging.

Arguments:

  • table_config TableConfig - Configuration for the table to be loaded.
  • config_manager ConfigManager - Configuration manager instance.
  • columns_to_exclude list[str], optional - Columns to exclude from the load. Defaults to None.

load_dataframe_silver_history​

def load_dataframe_silver_history(df_input: DataFrame,
table_config: TableConfig,
config_manager: ConfigManager = None,
*,
key_violation_action: str = "raise",
full_delivery: bool = True) -> None

Load a caller-supplied DataFrame into Silver.his and derive Silver.dbo from it.

This is the history route of an object without a bronze layer. The DataFrame is compared with Silver.his by load_dataframe_history, the function that also loads Bronze.his: only new and changed rows are appended, and a key that left the DataFrame gets a row with a negative SYSTEMSTATETIMESTAMP. Silver.his is never overwritten. SilverSkipDelete, SilverDeleteFilterQuery and SourceFilterQuery from HistorySettings apply.

Arguments:

  • df_input DataFrame - The current state of the object, or a part of it when full_delivery is false.
  • table_config TableConfig - Configuration of the object.
  • config_manager ConfigManager - Global configuration manager.
  • key_violation_action str - Action on duplicate keys in the DataFrame. Defaults to "raise".
  • full_delivery bool - When true, a key that is missing from the DataFrame counts as deleted.