-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
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
Allow direct usage of Date objects for inserts #215
Comments
consider using date_time_input_format= best_effort |
@mshustov, thanks! It works very well with DateTime fields (see the test). Date/Date32 are not parsed properly with this setting, though; I think we can revisit it in the scope of #216 @aimfeld, I added an example that should work for your use-case. Feel free to re-open or DM in the community Slack if you encounter any issues. |
@slvrtrn It works, thanks for the quick fix! |
I'm using clickhouse-js to insert rows into a table. For timestamps, I'm using
DateTime64(3, 'UTC')
. However, the client seems to have a problem with Date objects:Cannot parse input: expected '"' before: 'Z","message":"{\\"created_at\\":\\"2023-12-06T10:54:48.000Z\\",\\"modified_at\\":\\"2023-12-': (while reading the value of key created_at): While executing ParallelParsingBlockInputFormat: (at row 1) ... ,"error":{"code":"27","type":"CANNOT_PARSE_INPUT_ASSERTION_FAILED"}
When I convert the Date objects to strings and remove the timezone part, it works:
Environment
ClickHouse server
The text was updated successfully, but these errors were encountered: