Prerequisites
- Ensure that RisingWave can access the network where the Doris backend and frontend are located. For more details, see Synchronize Data Through External Table.
- Ensure you have an upstream materialized view or source that you can sink data from. For more details, see CREATE SOURCE or CREATE MATERIALIZED VIEW.
- Ensure that for
structelements, the name and type are the same in Doris and RisingWave. If they are not the same, the values will be set toNULLor to default values. For more details on thestructdata type, see Struct.
Syntax
Parameters
Examples
Create an append-only sink
To create anappend-only sink, set type = 'append-only' in the CREATE SINK query.
Create an upsert sink
To create anupsert sink, set type = 'upsert' in the CREATE SINK query. The Doris table must have a UNIQUE KEY when creating an upsert sink.
Data type mapping
The following table shows the corresponding data types between RisingWave and Doris that should be specified when creating a sink. For details on native RisingWave data types, see Overview of data types. In regards todecimal types, RisingWave will round to the nearest decimal place to ensure that its precision matches that of Doris. Ensure that the length of decimal types being imported into Doris does not exceed Doris’s decimal length. Otherwise, it will fail to import.
If a decimal value is out of bounds or represents
inf, -inf, or nan, RisingWave will insert null values.