We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to use the client to post to a json table CREATE table sensor_raw ( source LowCardinality(String) DEFAULT JSONExtractString(message_raw, 'source'), uid LowCardinality(String) DEFAULT JSONExtractString(message_raw, 'uid'), timeStamp DateTime64 DEFAULT fromUnixTimestamp(JSONExtractInt(message_raw, 'timeStamp')), tid LowCardinality(String) DEFAULT JSONExtractString(message_raw, 'tid'), traceId LowCardinality(String) DEFAULT JSONExtractString(message_raw, 'traceId'), dataProvider LowCardinality(String) DEFAULT JSONExtractString(JSONExtractString(message_raw,'payload'), ('dataProvider')), integrationId LowCardinality(String) DEFAULT JSONExtractString(JSONExtractString(message_raw,'payload'),('integrationId')), templateId LowCardinality(String) DEFAULT JSONExtractString(JSONExtractString(message_raw,'payload'),('templateId')), executionId LowCardinality(String) DEFAULT JSONExtractString(JSONExtractString(message_raw,'payload'), ('executionId')), message JSON DEFAULT message_raw, message_raw String EPHEMERAL ) ENGINE = MergeTree ORDER BY (source, uid);
inserting like this works insert into sensor_raw(message_raw) FORMAT JSONAsString {"source": "test", "uid": "test"}
but when using the sdk await this.clickhouseRepo.insertPromise('sensor_raw', [{message_raw: jsonData});
It fails with error Code: 117. DB::Exception: JSON object must begin with '{'.: (at row 1)
i can copy the log and do a directly insert and it works fine.
"@depyronick/nestjs-clickhouse": "^2.0.2", "@nestjs/core": "10.1.3",
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to use the client to post to a json table
CREATE table sensor_raw
(
source LowCardinality(String) DEFAULT JSONExtractString(message_raw, 'source'),
uid LowCardinality(String) DEFAULT JSONExtractString(message_raw, 'uid'),
timeStamp DateTime64 DEFAULT fromUnixTimestamp(JSONExtractInt(message_raw, 'timeStamp')),
tid LowCardinality(String) DEFAULT JSONExtractString(message_raw, 'tid'),
traceId LowCardinality(String) DEFAULT JSONExtractString(message_raw, 'traceId'),
dataProvider LowCardinality(String) DEFAULT JSONExtractString(JSONExtractString(message_raw,'payload'), ('dataProvider')),
integrationId LowCardinality(String) DEFAULT JSONExtractString(JSONExtractString(message_raw,'payload'),('integrationId')),
templateId LowCardinality(String) DEFAULT JSONExtractString(JSONExtractString(message_raw,'payload'),('templateId')),
executionId LowCardinality(String) DEFAULT JSONExtractString(JSONExtractString(message_raw,'payload'), ('executionId')),
message JSON DEFAULT message_raw,
message_raw String EPHEMERAL
) ENGINE = MergeTree ORDER BY (source, uid);
inserting like this works
insert into sensor_raw(message_raw) FORMAT JSONAsString {"source": "test", "uid": "test"}
but when using the sdk
await this.clickhouseRepo.insertPromise('sensor_raw', [{message_raw: jsonData});
It fails with error
Code: 117. DB::Exception: JSON object must begin with '{'.: (at row 1)
i can copy the log and do a directly insert and it works fine.
"@depyronick/nestjs-clickhouse": "^2.0.2",
"@nestjs/core": "10.1.3",
The text was updated successfully, but these errors were encountered: