Describes how to ingest data from MySQL table to RisingWave using table-valued function.
mysql_query
table-valued function (TVF). It offers a simpler alternative to Change Data Capture (CDC) when working with MySQL data in RisingWave.
Unlike CDC, which continuously syncs data changes, this function lets you fetch data directly from MySQL when needed. Therefore, this approach is ideal for static or infrequently updated data, as it’s more resource-efficient than maintaining a constant CDC connection.
mysql_query
as follows:
MySQL Type | RisingWave Type |
---|---|
bit(1) | boolean |
bit(>1) | bytea |
bool /boolean | smallint |
tinyint | smallint |
smallint | smallint |
mediumint | int |
int | int |
bigint | bigint |
float | float32 |
double | float64 |
decimal | decimal |
numeric | decimal |
year | int |
date | date |
time | time |
datetime | timestamp |
timestamp | timestamptz |
varchar | varchar |
char | varchar |
json | jsonb |
blob | bytea |
tinyblob | bytea |
mediumblob | bytea |
longblob | bytea |
array | unsupported |
enum | unsupported |
set | unsupported |
geometry | unsupported |
null | unsupported |
mysql_query
function to perform the query.