Gretel Project

Access artifacts in your project.

Gretel Workflows can read from and write to your Gretel Project. The actions below can be particularly useful alternatives if you have local data you want to run through a workflow, or don't have a destination to write output data to.

Reading Project Artifacts

The read_project_artifact action can be used to read in existing Gretel Project Artifacts as inputs to other actions.

Inputs

project_id

The project id the artifact is located in.

artifact_id

The id of the artifact to read.

Outputs

dataset

A dataset with exactly one item (the project artifact) represented as both a file and table.

Writing Project Artifacts

The write_project_artifact action can be used to write an action output to a Gretel Project.

Inputs

project_id

The project to create the artifact in.

artifact_name

The name of the artifact.

data

Reference to a data handle.

Outputs

None.

Examples

Train a Gretel Model from an existing project artifact and write the output to your project.

name: train-model-from-artifact

actions:
  - name: read-artifact
    type: read_project_artifact
    config:
      project_id: proj_1
      artifact_id: art_1

  - name: train-model
    type: gretel_model
    input: read-artifact
    config:
      project_id: proj_1
      model: synthetics/default
      training_data: "{outputs.read-artifact.dataset.files.data}"

  - name: write-artifact
    type: write_project_artifact
    config:
      project_id: proj_1
      artifact_name: my_output
      data: "{outputs.train-model.dataset.files.data}"

Last updated