Export Data Set

Action ID: export_dataset

Description

Export a dataset to a file.

Input Parameters

Name
Type
Required
Default
Description

dataset_id

string

-

The ID of the dataset to export.

workflow_run_status

dropdown

-

null

Filter documents by workflow run status. Available options: created, queued, running, success, failed

View JSON Schema
{
  "description": "Export Data Set node input.",
  "properties": {
    "dataset_id": {
      "description": "The ID of the dataset to export.",
      "title": "Dataset ID",
      "type": "string"
    },
    "workflow_run_status": {
      "anyOf": [
        {
          "enum": [
            "created",
            "queued",
            "running",
            "success",
            "failed"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter documents by workflow run status.",
      "title": "Filter documents by workflow run status"
    }
  },
  "required": [
    "dataset_id"
  ],
  "title": "ExportDatasetNodeInput",
  "type": "object"
}

Output Parameters

Name
Type
Description

exported_file_url

string

The URL of the exported file.

View JSON Schema
{
  "description": "Export Data Set node output.",
  "properties": {
    "exported_file_url": {
      "description": "The URL of the exported file.",
      "title": "Exported file URL",
      "type": "string"
    }
  },
  "required": [
    "exported_file_url"
  ],
  "title": "ExportDatasetNodeOutput",
  "type": "object"
}

How It Works

This node retrieves all records from the specified dataset, optionally filtering by workflow run status, and generates an export file. The records are serialized into a downloadable format (typically CSV or JSON), and the node returns a URL where the exported file can be accessed. The export process preserves all field data and maintains data integrity throughout the operation.

Usage Examples

Example 1: Export Entire Dataset

Input:

dataset_id: "dataset_customers_001"
workflow_run_status: null

Output:

exported_file_url: "https://storage.agenticflow.com/exports/dataset_customers_001_20240115_143022.csv"

Example 2: Export Only Successful Records

Input:

dataset_id: "dataset_orders_456"
workflow_run_status: "success"

Output:

exported_file_url: "https://storage.agenticflow.com/exports/dataset_orders_456_success_20240115_143145.csv"

Example 3: Export Failed Records for Analysis

Input:

dataset_id: "dataset_transactions_789"
workflow_run_status: "failed"

Output:

exported_file_url: "https://storage.agenticflow.com/exports/dataset_transactions_789_failed_20240115_143301.csv"

Common Use Cases

  • Data Backup: Create periodic backups of your datasets for archival purposes

  • Analytics and Reporting: Export data for analysis in external tools like Excel, Tableau, or Python

  • Data Migration: Transfer data from AgenticFlow to other systems or platforms

  • Audit and Compliance: Generate exports for compliance audits and record-keeping

  • Error Analysis: Export failed records to investigate and troubleshoot processing issues

  • Data Sharing: Share dataset contents with team members or external stakeholders

  • Quality Assurance: Export successful records to verify workflow processing results

Error Handling

Error Type
Cause
Solution

Dataset Not Found

Dataset ID doesn't exist

Verify the dataset_id is correct and the dataset exists

Empty Dataset

No records in dataset or filter returned no results

Check if dataset has data or adjust filter criteria

Export Generation Failed

Server error during file creation

Retry the export operation after a brief delay

Invalid Status Filter

workflow_run_status value is not valid

Use one of the valid status values: created, queued, running, success, failed

Storage Error

Cannot write export file to storage

Check system storage availability and retry

Timeout Error

Dataset too large to export in time

Consider filtering the dataset or exporting in smaller batches

Permission Error

Insufficient permissions to access dataset

Verify you have read access to the specified dataset

Notes

  • File Format: Exported files are typically in CSV format for easy compatibility with various tools and platforms.

  • File URL Expiration: The exported_file_url may have an expiration time. Download the file promptly after export.

  • Filtering: Use workflow_run_status to export only records that match specific processing states, useful for debugging or analysis.

  • Large Datasets: Exporting very large datasets may take time. Consider applying filters to reduce export size if needed.

  • Data Privacy: Be mindful of sensitive data when exporting and sharing files. Ensure proper access controls are in place.

  • Scheduled Exports: Combine this node with schedulers or triggers to automate regular dataset exports.

  • Storage Costs: Exported files consume storage space. Regularly clean up old export files to manage costs.

  • Download Timing: Download the exported file as soon as possible as temporary export URLs may expire after a period of time.

Last updated

Was this helpful?