Skip to content

Commit

Permalink
raw generic needs to be a string as well
Browse files Browse the repository at this point in the history
  • Loading branch information
plessbd committed Feb 26, 2019
1 parent e56b246 commit 10ef372
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"num_cores": "raw.num_cores",
"memory_mb": "raw.memory_mb",
"disk_gb": "raw.disk_gb",
"start_time": "IF(existing.start_time IS NULL OR raw.start_time < existing.start_time, raw.start_time, existing.start_time)"
"start_time": "IF(existing.start_time IS NULL OR UNIX_TIMESTAMP(CONVERT_TZ(raw.start_time,'+00:00', @@session.time_zone)) < existing.start_time, UNIX_TIMESTAMP(CONVERT_TZ(raw.start_time,'+00:00', @@session.time_zone)), existing.start_time)"
},

"joins": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"num_cores": "raw.num_cores",
"memory_mb": "raw.memory_mb",
"disk_gb": "raw.disk_gb",
"start_time": "IF(existing.start_time IS NULL OR raw.start_time < existing.start_time, raw.start_time, existing.start_time)"
"start_time": "IF(existing.start_time IS NULL OR UNIX_TIMESTAMP(CONVERT_TZ(raw.start_time,'+00:00', @@session.time_zone)) < existing.start_time, UNIX_TIMESTAMP(CONVERT_TZ(raw.start_time,'+00:00', @@session.time_zone)), existing.start_time)"
},

"joins": [
Expand Down
6 changes: 3 additions & 3 deletions configuration/etl/etl_tables.d/cloud_generic/raw_event.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
},
{
"name": "event_time_utc",
"type": "decimal(16, 6)",
"type": "char(26)",
"nullable": false,
"default": 0,
"comment": "The time of the event as a unix timestamp to the microsecond.."
"default": "0000-00-00T00:00:00.000000",
"comment": "String representation of timestamp directly from the logs."
},
{
"name": "event_type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
},
{
"name": "start_time",
"type": "decimal(16, 6)",
"type": "char(26)",
"nullable": true,
"default": 0,
"comment": "First time this configuration was encountered as a unix timestamp to the microsecond., defaults to unknown."
"default": "0000-00-00T00:00:00.000000",
"comment": "First time this configuration was encountered as a unix timestamp to the microsecond, defaults to unknown."
}
],
"indexes": [
Expand Down

0 comments on commit 10ef372

Please sign in to comment.