dataspace_file_sink_stop

Uploads upstream pipeline output files to a Dataspace directory as a DAG terminal node.

539|171|Updated May 3, 2018
One-click install
npx skills add https://github.com/cas-bigdatalab/piflow --skill dataspace-file-sink-stop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dataspace_file_sink_stop
Source: https://github.com/cas-bigdatalab/piflow/tree/main/workspace/skills/dataspace_file_sink_stop
Command: npx skills add https://github.com/cas-bigdatalab/piflow --skill dataspace-file-sink-stop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

When a data pipeline finishes, its result files often need to be persisted into a shared Dataspace storage space. Doing this manually is error-prone and breaks DAG automation. This Skill acts as the terminal node of a DAG, taking the upstream operator's file output and uploading it into a specified Dataspace directory automatically.

Core Features & Use Cases

  • Terminal DAG Sink: Designed to be placed at the end of a pipeline, receiving a single file output from an upstream operator.
  • Managed Staging & Upload: Copies the input file into a local managed directory, then uploads the whole directory to the target Dataspace datasource via its instance ID.
  • Overwrite Control & Local Output: Optional overwrite flag protects existing files, and a local output reference is retained for downstream result tracking.
  • Use Case: A research data pipeline produces a cleaned CSV; this operator uploads it to the team's Dataspace space under a given relative directory, keeping the original filename.

Quick Start

Ask the agent to run the dataspace_file_sink_stop operator with the upstream file output, your Dataspace datasource ID, and the target relative directory to upload the result file at the end of the pipeline.

Frequently Asked Questions about dataspace_file_sink_stop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload pipeline output files to Dataspace in a DAG?

Place the dataspace_file_sink_stop operator as the terminal node of your DAG and pass the upstream operator's file output as the input parameter along with your Dataspace datasource ID and target relative directory. The script stages the file locally and uploads it automatically.

What parameters does the Dataspace file sink operator require?

It requires input (the upstream file reference), datasource_id (the Dataspace datasource instance ID), relative_path (target directory in the space), and output (local output path). The overwrite parameter is optional and defaults to false.

Can I rename the file when uploading to Dataspace?

No, the uploaded file always keeps the original filename of the input file. The relative_path parameter only specifies the target directory inside the Dataspace space, and the script appends the input filename automatically.

What happens if a file with the same name already exists?

If a file with the same name exists in the local managed staging directory and overwrite is false, the script raises a FileExistsError and stops. Set overwrite to true to replace the existing staged file before uploading.

Why must this operator be the last node in the DAG?

It is a sink operator that consumes a file and produces only a retained local output reference for result tracking, with no further data transformation. Its purpose is final persistence of results to Dataspace, so it is designed to terminate the workflow.