Skip to content

Commit

Permalink
adjust timestamp layout for clickhouse and sqlserver
Browse files Browse the repository at this point in the history
- increased precision of timestamp layout in clickhouse template to 9 decimal places for improved accuracy
- enhanced sqlserver timestamp layout to handle microseconds and timezone information more reliably, improving data consistency
  • Loading branch information
flarco committed Dec 23, 2024
1 parent 12bfe56 commit 8522f84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/dbio/templates/clickhouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,5 @@ variable:
bool_as: string
error_filter_table_exists: already
quote_char: '`'
timestamp_layout: '2006-01-02 15:04:05.000000 -07'
timestamp_layout: '2006-01-02 15:04:05.000000000 -07'
timestamp_layout_str: parseDateTime64BestEffortOrNull('{value}')
4 changes: 2 additions & 2 deletions core/dbio/templates/sqlserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,12 @@ function:


variable:
timestamp_layout: '2006-01-02 15:04:05.000000'
timestamp_layout: '2006-01-02 15:04:05.0000000'
timestamp_layout_str: "cast('{value}' as datetime2)"

# https://stackoverflow.com/a/17867687/2295355
timestampz_layout_str: "ToDateTimeOffset('{value}')"
timestampz_layout: "2006-01-02 15:04:05.000000', '-07:00"
timestampz_layout: "2006-01-02 15:04:05.0000000', '-07:00"

bind_string: "@p{c}"
batch_rows: 200
Expand Down

0 comments on commit 8522f84

Please sign in to comment.