Anyone here using <Amazon DynamoDB SQL Connector>?...
# troubleshooting
j
Anyone here using Amazon DynamoDB SQL Connector? I tried it in my local Flink installation using SQL Client
Copy code
Flink SQL> CREATE TABLE p2p_features_dynamodb_table (
>   `msisdn` STRING,
>   `transmission_date_and_time` STRING,
>   `total_amount_1h` DOUBLE,
>   `total_amount_1d` DOUBLE,
>   `total_amount_30d` DOUBLE,
>   `num_send_all_count_1d` INT,
>   `num_send_all_count_30d` INT
> ) WITH (
>   'connector' = 'dynamodb',
>   'aws.region' = 'ap-southeast-1',
>   'table-name' = 'p2p_features_dynamodb_table'
> );
Flink SQL> INSERT INTO p2p_features_dynamodb_table VALUES ('+639190000001', '2023-07-29T13:31:47Z', 1.0, 2.0, 3.0, 1, 2);
[INFO] Submitting SQL update statement to the cluster...
[INFO] SQL update statement has been successfully submitted to the cluster:
Job ID: 2851081ab0502aff98774bd2dd622981
It works but the latency is inconsistent. It ranges from 2s to 10s. Is this the expected behavior? I was expecting it to be in milliseconds.
h
There is some overhead to setting up the Flink job, and running it on the cluster. Have you tried running it in streaming mode?
In streaming mode you will have 1 job that runs continuously, in comparison with the batch job you currently have that needs to be reconstructed each time you run
j
Thanks I will try it.