Syntax
For CSV data, specify the delimiter in the
delimiter option in ENCODE properties.Parameters
In RisingWave Cloud, the default AWS credential provider chain is disabled. Provide
s3.credentials.access and s3.credentials.secret (or use a supported assume-role setup). These credentials cannot be omitted. The enable_config_load option is supported only in self-hosted deployments.Empty cells in CSV files will be parsed to
NULL.Additional columns
Working with S3 sources
Learn how to work with S3 sources through practical examples and scenarios. To avoid conflicts, double-quote all field names (e.g.,"field_name") when working with case-sensitive sources. For more conventions on naming and identifier handling, see Identifiers.
Basic examples
Here are examples of connecting RisingWave to an S3 source to read data from individual streams.- CSV
- JSON
- PARQUET
Object filtering in S3 buckets
RisingWave has a prefix argument designed for filtering objects in the S3 bucket. It relies on Apache Opendal whose prefix filter implementation is expected to be released soon.Handle new files in the bucket
RisingWave periodically scans for new files matching the pattern (default interval: 60 seconds). To customize the discovery interval, setrefresh.interval.sec (in seconds).
RisingWave automatically ingests new files added to the bucket. However, it does not detect updates to a file if a file is deleted and a new file with the same name is added simultaneously. Additionally, RisingWave will ignore file deletions.
Read data from the source
You need to create a materialized view from the source or create a table with the S3 connector to read the data. Here are some examples:Column names and types are not inferred automatically from the source. You must explicitly define them when creating the table or materialized view.
Read Parquet files from S3
You can use the table functionfile_scan() to read Parquet files from S3, either a single file or a directory of Parquet files.
Function signature
When reading a directory of Parquet files, the schema will be based on the first Parquet file listed. Please ensure that all Parquet files in the directory have the same schema.
sales_data.parquet that stores a company’s sales data, containing the following fields:
product_id: Product IDsales_date: Sales datequantity: Sales quantityrevenue: Sales revenue