snowflake.snowpark_checkpoints_collector.collect_dataframe_checkpoint

snowflake.snowpark_checkpoints_collector.collect_dataframe_checkpoint(df: pyspark.sql.DataFrame, checkpoint_name: str, sample: float | None = None, mode: CheckpointMode | None = None, output_path: str | None = None) None

Collect a DataFrame checkpoint.

Parameters:
  • df (SparkDataFrame) – The input Spark DataFrame to collect.

  • checkpoint_name (str) – The name of the checkpoint.

  • sample (float, optional) – Fraction of DataFrame to sample for schema inference. Defaults to 1.0.

  • mode (CheckpointMode) – The mode to execution the collection. Defaults to CheckpointMode.Schema

  • output_path (str, optional) – The output path to save the checkpoint. Defaults to Current working Directory.

Raises:
  • Exception – Invalid mode value.

  • Exception – Invalid checkpoint name. Checkpoint names must only contain alphanumeric characters , underscores and dollar signs.