Skip to main content

Write to AWS S3

This guide shows you how to create an AWS S3 Write Component.

Prerequisites​

  • S3 Connection with write permissions
  • An Ascend Flow with a Component that contains data

Create a new Write Component​

Begin from your workspace Super Graph view. Follow these steps to create your Write Component:

  1. Double-click the Flow where you want to create your component
  2. Right-click on any Component
  3. Hover over Create Downstream -> Write, and select your target Connection menu
  4. Complete the form with these details:
    • Select your Flow
    • Enter a descriptive Component Name like write_mysql form

Configure your S3 Write Component

Follow these steps to set up your S3 Write Component:

  1. Configure your Connection
    • Enter your S3 Connection name in the connection field
  2. Specify a data source
    • Set input to the Component that contains your source data
  3. Define the write target
    • Configure the s3 write connector options
    • Specify your target table name, schema, and other required properties
  4. Select a write strategy

    Choose one of these strategies based on your use case:

    StrategyDescriptionBest For
    partitionedUpdates only modified partitionsTime-series data, regional datasets, date-partitioned data
    fullReplaces entire target during each Flow RunReference tables, complete data refreshes
    snapshotFlexible output - single file or chunked based on pathData exports, analytical datasets, flexible output requirements

For complete details on output format options and when to use each approach, see the write output formats guide.

Examples​

Choose the write strategy that best fits your use case:

tip

Partitioned is the default Write strategy, so if you don't specify a strategy as shown here, you'll be using the Partitioned strategy.

This example shows an S3 Write Component that uses a partitioned write strategy. Partitioned writes now produce chunked output with multiple files per partition.

write_s3_partitioned.yaml
component:
write:
connection: write_s3
input:
name: my_component
flow: my_flow
strategy:
partitioned:
mode: append
s3:
path: /some_parquet_dir
formatter: parquet

You can also override the default chunk size of 500K rows and configure a custom chunk size using the part_file_rows field:

write_custom_chunk.yaml
component:
write:
connection: write_s3
input:
name: my_component
flow: my_flow
s3:
path: /some_other_dir/
formatter: json
part_file_rows: 1000

Output: Multiple files like data_001.parquet, data_002.parquet, etc. in each partition directory.

🎉 Congratulations! You successfully created an S3 Write Component in Ascend.