Skip to content
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

Fix for generic cloud datetime, and openstack instance type datetime #820

Merged
merged 1 commit into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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