artifacts.OnArtifact

Contents

artifacts.OnArtifact#

class unionai.artifacts.OnArtifact(trigger_on, inputs=None)#
OnArtifact(

trigger_on=dailyArtifact, inputs={

“today_upstream”: dailyArtifact, # this means: use the matched artifact “yesterday_upstream”: dailyArtifact.query(time_partition=dailyArtifact.time_partition - timedelta(days=1)), # this means: use the matched hourly artifact “other_daily_upstream”: hourlyArtifact.query(partitions={“region”: “LAX”}), “region”: “SEA”, # static value that will be passed as input “other_artifact”: UnrelatedArtifact.query(time_partition=dailyArtifact.time_partition - timedelta(days=1)), “other_artifact_2”: UnrelatedArtifact.query(time_partition=hourlyArtifact.time_partition.truncate_to_day()), “other_artifact_3”: UnrelatedArtifact.query(region=hourlyArtifact.time_partition.truncate_to_day()),

},

)

Parameters:
  • trigger_on (Artifact)

  • inputs (Dict[str, Any | Artifact | ArtifactQuery] | None)