Open artemklevtsov opened 6 days ago
Hey @artemklevtsov 👋 Could you please try the following?
args_mapping: |
root = [
this.id.uint64(),
this.x.float64(),
]
Thank you for the suggestion, but it don't works:
Log output:
ERRO Failed to send message to sql_insert: clickhouse [AppendRow]: x clickhouse [AppendRow]: converting float64 to Decimal(18, 2) is unsupported @service=redpanda-connect label="" path=root.output
I found workaround using sql_raw
:
input:
generate:
count: 1
mapping: |
root.id = 1
root.x = 3.14
output:
sql_raw:
driver: clickhouse
dsn: clickhouse://127.0.0.1:9000/default
query: INSERT INTO test (id, x) VALUES ($1, $2);
args_mapping: |
root = [
this.id,
this.x,
]
init_statement: |
create table if not exists test(id UInt64, x Decimal64(2)) order by id;
Hi,
Is there a way to insert decimal type to clickhouse?
My test config:
Log output:
I tried
x.string()
without success.Test environment: