Skip to content

_write_dataframe_to_table

Internal helper
This page documents an internal implementation helper, not a primary public API.
Source code in src/fabricops_kit/quality.py
2197
2198
2199
2200
2201
def _write_dataframe_to_table(spark, df, table: str, mode: str = "append") -> None:
    if hasattr(df, "write"):
        df.write.mode(mode).saveAsTable(table)
    else:
        spark.createDataFrame(df.to_dict(orient="records")).write.mode(mode).saveAsTable(table)