You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have OpenTelemetry data stored in Clickhouse. Timestamps have nanosecond granularity.
To Reproduce
Any SQL query retrieving those timestamps.
Expected behavior
Timestamps should be properly parsed (eventually losing precision), but an exception is returned. The call to strptime fails when timestamps have a nanosecond component with a ValueError (unconverted data remains) :
Describe the bug
I have OpenTelemetry data stored in Clickhouse. Timestamps have nanosecond granularity.
To Reproduce
Any SQL query retrieving those timestamps.
Expected behavior
Timestamps should be properly parsed (eventually losing precision), but an exception is returned. The call to strptime fails when timestamps have a nanosecond component with a ValueError (unconverted data remains) :
https://github.com/xzkostyan/clickhouse-sqlalchemy/blob/master/clickhouse_sqlalchemy/drivers/http/transport.py#L29
This simple workaround where the argument to strptime is truncated to 26 chars max clears the issue:
Versions
Sample run
The text was updated successfully, but these errors were encountered: