Using Workflow Export Steps

Export Steps allow you to UNLOAD data from Redshift/Snowflake tables into S3. The exported files are visible in the Downloads section of the platform.

Before diving into examples, let’s explore how to configure an Export Step and its parameters.

Export Step

To create an Export Step, you need to define the following parameters:

  • schema: The DB schema in which the required table is present.

  • table: The name of the table from which data is to be exported.

  • sortBy: The column name by which the data is to be sorted.

  • sortOrder: The order in which the data is to be sorted. It can be either asc or desc. Default value is asc.

  • compression: Boolean value to enable or disable compression of the exported files. The files are compressed to .gz format. Default value is false.

Export Step Configuration

Export Step in Workflow

The following example demonstrates how to configure an Export Step in a Workflow.

body:
    name: export-step-workflow
    triggers: []
    watchers: []
    tags: []
    steps:
        step-1:
            type: export
            schema: stage
            table: student
            sortBy: id
            sortOrder: asc
            compression: true

Export Step in Press Spec

The following example demonstrates how to configure an Export Step in a Block Spec. The similar configuration can be used for creating a spec release as well.

# block_spec.yaml

body:
    version: 1
    kind: workflow
    metadata:
        name: workflow-block
        title: Workflow Block
        summary: Workflow Block
        description: Creating a new workflow block spec
        descriptionContentType: text/markdown
        imageUrl: https://my-block-pics.com/image-0.jpg
        tags:
            - name: CLI
    release:
        version: 1.0.0
        notes: This is the original release
    config:
        steps:
            step-1:
                type: export
                schema: stage
                table: student
                sortBy: id
                sortOrder: asc
                compression: true
featured: true
autoRunOnDeploy: true