Slide 14
Slide 14 text
Source DDL example
CREATE TABLE {{ NETWORK }}_logs (
log_index int,
transaction_hash string,
transaction_index int,
address varchar,
data string,
topics array,
block_timestamp int,
block_number int,
block_hash varchar,
proc_time as PROCTIME(),
event_time as TO_TIMESTAMP_LTZ(block_timestamp, 0),
WATERMARK FOR event_time AS event_time - INTERVAL '5' SECOND
) WITH (
'connector' = 'kafka',
'topic' = '{{ NETWORK }}.logs',
'properties.bootstrap.servers' = '{{ KAFKA_BROKER }}',
'properties.group.id' = 'defimon',
'scan.startup.mode' = 'latest-offset',
'format' = 'json'
)