lakehouse.databricks.common.create_merge_dict

lakehouse.databricks.common.create_merge_dict(spark, columns) dict

Create a dictionary of the form {"column1": "source.column1", "column2": "source.column2", ...}, where "column1", "column2", etc. are the columns in 'columns'.

Parameters

sparkspark context

Spark context object passed from the calling Spark instance.

columnslist

A list of strings representing the columns to be used in the dictionary.

Returns

dict:

A dictionary of the form {"column1": "source.column1", "column2": "source.column2", ...}.