Skip to content

generate_metadata_profile

Public callable

Generate standard metadata profile rows for a Spark/Fabric DataFrame.

Parameters:

Name Type Description Default
df Any

Spark DataFrame to profile.

required
table_name str

Logical table name used in the output metadata records.

required
exclude_columns list[str] | set[str] | None

Optional columns to skip during profiling.

None
run_timestamp_timezone str

Timezone used to stamp profile rows.

"Asia/Singapore"

Returns:

Type Description
Any

Spark DataFrame with metadata profile records.

Source code in src/fabricops_kit/profiling.py
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
def generate_metadata_profile(df, table_name: str, exclude_columns=None, run_timestamp_timezone="Asia/Singapore"):
    """Generate standard metadata profile rows for a Spark/Fabric DataFrame.

    Parameters
    ----------
    df : Any
        Spark DataFrame to profile.
    table_name : str
        Logical table name used in the output metadata records.
    exclude_columns : list[str] | set[str] | None, optional
        Optional columns to skip during profiling.
    run_timestamp_timezone : str, default="Asia/Singapore"
        Timezone used to stamp profile rows.

    Returns
    -------
    Any
        Spark DataFrame with metadata profile records.
    """
    return profile_dataframe_to_metadata(
        df=df,
        table_name=table_name,
        exclude_columns=exclude_columns,
        run_timestamp_timezone=run_timestamp_timezone,
    )