File Operations
Move, copy, archive, and clean up files as part of an automated workflow — without writing a pipeline. File Operation, Custom Command, and Condition steps let you orchestrate file handling (FTP/SFTP servers, cloud object storage, HDFS) alongside your pipelines and child orchestrators, all from the same drag-and-drop DAG editor.
Overview
File Operations adds three new step types to the Orchestrator DAG editor, alongside the existing Pipeline, Orchestrator, and Parallel Group steps:
- File Operation — list, download, upload, delete, move, rename, zip, or unzip files on a connected file store.
- Custom Command — run a shell command, either on the DataKnits host, over SSH on a remote server, or through a cloud CLI (AWS/Azure/GCP/OCI/HDFS).
- Condition — evaluate a true/false expression (for example, "did any files arrive?") and route the orchestrator down a success or failure branch accordingly.
These steps live entirely inside orchestrators. They are not available on the pipeline canvas — pipelines remain focused on data transformation, while orchestrators sequence pipelines, sub-orchestrators, and now file/command housekeeping into a single automated flow.
File Storage Connections
File Operation steps run against a Connection you already have configured (the same connections used elsewhere in DataKnits). Supported connection types include:
| Category | Supported Types |
|---|---|
| File Transfer | FTP, SFTP |
| Cloud Object Storage | Amazon S3, Azure Blob Storage, Azure Data Lake Storage (ADLS), Google Cloud Storage (GCS), Oracle Cloud Infrastructure (OCI) Object Storage |
| Distributed File System | HDFS |
When you select a connection inside a File Operation step, the panel shows its native method and supported capabilities — this tells you upfront which operations that particular connection can perform before you configure the rest of the step.
Adding Steps to an Orchestrator
- Open an existing orchestrator (or create a new one) and go to its Editor tab.
- In the toolbar above the canvas, click Add File Op, Add Custom Command, or Add Condition.
- A new step card appears on the canvas. Click it to open the configuration panel on the right.
- Fill in the step's fields (covered below), then drag the green (Success) or red (Failure) connector on the right edge of the step to another step to wire up the flow.
- Click Save DAG when you're done.
File Operation Step
Click a File Operation step to configure it in the right-hand panel:
| Field | Description |
|---|---|
| Operation | The action to perform. See Operations Reference below. |
| Connection | Which file store this step runs against. |
| Source Path | The file or folder path to act on. Supports ${param.NAME} substitution. |
| Destination Path | Shown for MOVE, RENAME, PUT, ZIP, and UNZIP — where the result should end up. |
| Local Path (ETL host) | Shown for GET and PUT — the path on the DataKnits execution host used as the local side of the transfer. |
| Execution Mode (override) | Leave as Provider default unless you need to force a specific transport. See Execution Modes. |
| Output Param | Optional. Give this a name (e.g. FILE_COUNT) to publish the step's result — such as the number of files listed — for use by later steps as ${param.FILE_COUNT}. |
Operations Reference
| Operation | What it does | Fields used |
|---|---|---|
| LIST | Lists files/folders at the source path. Useful for checking whether new files have arrived, combined with a downstream Condition step. | Source Path |
| GET | Downloads a file from the connection to the DataKnits host. | Source Path, Local Path |
| PUT | Uploads a file from the DataKnits host to the connection. | Source Path, Local Path, Destination Path |
| DELETE | Deletes a file or folder at the source path. | Source Path |
| MOVE | Moves a file/folder from the source path to the destination path (e.g. into an archive folder). | Source Path, Destination Path |
| RENAME | Renames a file/folder in place. | Source Path, Destination Path |
| ZIP | Compresses the source path into an archive at the destination path. | Source Path, Destination Path |
| UNZIP | Extracts an archive at the source path into the destination path. | Source Path, Destination Path |
Execution Modes
By default, each connection uses its natural transport method automatically. Override this only when your environment requires a specific transport:
| Mode | When to use it |
|---|---|
| REST / SDK | Uses the cloud provider's API/SDK directly — the default for S3, Azure Blob, ADLS, GCS, and OCI. |
| OS Command (local) | Runs the operation as a local shell command on the DataKnits host. |
| SSH (remote shell) | Runs the operation over an SSH session on a remote server. |
| Cloud CLI | Shells out to the relevant cloud command-line tool (aws, az, gsutil, oci, or hdfs) instead of the SDK — useful when your organization standardizes on CLI-based tooling. |
Custom Command Step
Use a Custom Command step for anything outside the standard file operations — running a legacy shell script, invoking a third-party CLI, or performing custom cleanup logic.
| Field | Description |
|---|---|
| Template | Optional. If your administrator has published a reusable command template, pick it here instead of typing the command inline. |
| Run On | Local OS, Remote SSH, or Cloud CLI. |
| OS Type | Linux (bash), Windows (cmd), Windows (PowerShell), or AIX / Unix. |
| Command Body | The inline command to run (hidden if a Template is selected). Supports ${param.NAME} substitution. |
| Timeout (sec) | How long to wait before the step is marked failed. Default 120 seconds. |
| Success When | Exit code == 0 (default), stdout contains… a pattern you specify, or Any (always treated as success, ignoring the exit code). |
| Output Param | Optional name under which the command's stdout/exit result is published for downstream steps. |
Condition Step
A Condition step evaluates a boolean expression against the orchestrator's current parameter values. If the expression is true, the flow follows the step's Success route; if false, it follows the Failure route.
| Field | Description |
|---|---|
| Description | A plain-language label, e.g. "If LOAD_DATE is today, route success; else route failure". |
| Expression | e.g. ${param.FILE_COUNT} > 0 && ${param.ENV} == "PROD". Supported operators: == != > >= < <= && || !. Use quotes around string literals. |
FILE_COUNT) → Condition step checking ${param.FILE_COUNT} > 0 → only run the ingestion pipeline when files actually arrived.
Using Parameters (${param.NAME})
Every path, command body, and expression field in these steps supports ${param.NAME} substitution, resolved at run time against the orchestrator's declared parameters.
- Click the Insert → … button under any supported field to search and insert a parameter token.
- You can also drag a parameter directly from the left panel and drop it into any field.
- Any step's Output Param becomes available to every step that runs after it, so a LIST step's file count, or a Custom Command's exit code/stdout, can drive a later Condition step or be referenced in a later path.
Routing, Retries & Alerts
File Operation, Custom Command, and Condition steps use the same routing model as pipeline and orchestrator steps:
- Success / Failure routes — drag from the green or red connector on a step to wire it to the next step. Leave a route unset to fall through to "Next Step" (success) or "Stop" (failure), or explicitly choose End / Continue.
- Retry Count / Retry Delay (sec) — automatically retry a failed step before routing to Failure.
- Timeout (min) — maximum time the step is allowed to run.
- Alerts — enable Alert on Start, Alert on Success, and/or Alert on Failure per step to trigger the notification rules configured under Settings → Email.
Worked Example: Watch, Ingest, Archive
- Add a File Operation step: Operation
LIST, Connection = your SFTP connection, Source Path/incoming/${param.LOAD_DATE}/, Output ParamFILE_COUNT. - Add a Condition step: Expression
${param.FILE_COUNT} > 0. Route its Success edge to the pipeline that ingests the data. - After the pipeline's Success route, add a second File Operation step: Operation
MOVE, Source Path/incoming/${param.LOAD_DATE}/orders.csv, Destination Path/archive/${param.LOAD_DATE}/orders.csv. - Optionally add a Custom Command step afterward to clean up any temporary local files.
- Save the DAG and attach a schedule under the orchestrator's Schedule tab.
Troubleshooting
| Symptom | Likely cause / fix |
|---|---|
| Connection list is empty in the File Operation panel | No connection of a supported type (FTP/SFTP/S3/Azure Blob/ADLS/GCS/OCI/HDFS) has been created yet — add one under Connections first. |
| Step fails immediately with a permissions/authentication error | Test the underlying connection (Connections → your connection → Test) before troubleshooting the orchestrator step itself. |
| Custom Command times out | Increase Timeout (sec), or switch Run On if the command was written for a different shell/OS. |
| Condition step always routes to Failure | Confirm the upstream step's Output Param name exactly matches the name used in the expression, and that the upstream step actually ran before the condition (check its position in the routing chain). |