Skip to content

integration.snowflake

get_artifact_v1

comet_ml.integration.snowflake.get_artifact_v1(experiment, artifact_name,
    workspace=None, version_or_alias=None)

Get the SQL query for a Snowflake Artifact.

Args:

  • experiment: Experiment (required), instance of Experiment object
  • artifact_name: string (required), artifact name
  • workspace: string (optional), retrieve an artifact belonging to that workspace
  • version_or_alias: Iterable of string (optional), retrieve the artifact by the given alias or version

Returns: String or None

log_snowpark_dataframe_v1

comet_ml.integration.snowflake.log_snowpark_dataframe_v1(experiment,
    artifact_name, dataframe, artifact_version=None, artifact_aliases=None,
    log_sample=False, sample_size=10)

Logs a Snowpark Dataframe as a Snowflake Artifact to Comet. The full dataset is not saved in Comet, instead we record both the SQL query and a small preview sample.

Args:

  • experiment: Experiment (required), instance of an Experiment used to log the Artifact
  • artifact_name: string (required), the name of the Artifact to create
  • dataframe: Snowpark Dataframe (required), the Snowpark Dataframe to record
  • artifact_version: string (optional), version of the artifact. If none is provided Comet will auto-increment the version
  • artifact_aliases: Iterable of string (optional), aliases to associate with the Artifact
  • log_sample: Boolean (optional), whether a preview of the dataset should be saved to the Comet platform. Defaults to False
  • sample_size: int (optional), number of rows to record from the sample dataframe defined previously. Defaults to 10

Returns: None

log_artifact_v1

comet_ml.integration.snowflake.log_artifact_v1(experiment, artifact_name,
    sql, sample=None, sample_size=100, url=None, artifact_version=None,
    artifact_aliases=None)

Logs a Snowflake Artifact to Comet based on a SQL query and a sample Pandas DataFrame.

Args:

  • experiment: Experiment (required), instance of an Experiment used to log the Artifact
  • artifact_name: string (required), the name of the Artifact to create
  • sql: string (required), the SQL used to generate the Snowflake dataset
  • sample: Pandas DataFrame (optional), sample of the data generated by the SQL query defined previously
  • sample_size: int (optional), number of rows to record from the sample dataframe defined previously. Defaults to 100
  • artifact_version: string (optional), version of the artifact. If none is provided Comet will auto-increment the version
  • artifact_aliases: Iterable of string (optional), aliases to associate with the Artifact

Returns: None

Feb. 24, 2024