Skip to main content

easyfabric.loaders.merge

full_load_silver​

def full_load_silver(table_config: TableConfig,
config_manager: ConfigManager = None,
columns_to_exclude: list[str] = None,
force_reload: bool = False)

Fully replace silver his table with 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.
  • force_reload bool, optional - Bypass the up-to-date gate and rebuild silver in full from bronze. Defaults to False.

refresh_silver_from_history​

def refresh_silver_from_history(table_config: TableConfig,
config_manager: ConfigManager) -> None

Overwrite Silver.dbo with the latest row per key from Silver.his, leaving deleted keys out.

Arguments:

  • table_config TableConfig - Configuration of the object.
  • config_manager ConfigManager - Global configuration manager.

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 :func: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.

merge_source_into_target​

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

Merges source data from the bronze lakehouse 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.
  • force_reload bool, optional - Empty silver history first so the merge rebuilds it in full from bronze. Defaults to False.

bronze_into_silver​

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

Merges source data from the bronze lakehouse 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 = None,
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.