Skip to content

Commit

Permalink
Optimize clickhouse types
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJoiner committed Mar 12, 2024
1 parent bf5be8e commit d6fb590
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/vss/vehicle-table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ CREATE TABLE IF NOT EXISTS vehicle (
CurrentLocation_Altitude Float64 COMMENT 'Current altitude relative to WGS 84 reference ellipsoid, as measured at the position of GNSS receiver antenna.',
CurrentLocation_Latitude Float64 COMMENT 'Current latitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna.',
CurrentLocation_Longitude Float64 COMMENT 'Current longitude of vehicle in WGS 84 geodetic coordinates, as measured at the position of GNSS receiver antenna.',
CurrentLocation_Timestamp DateTime COMMENT 'Timestamp from GNSS system for current location, formatted according to ISO 8601 with UTC time zone.',
CurrentLocation_Timestamp DateTime('UTC') COMMENT 'Timestamp from GNSS system for current location, formatted according to ISO 8601 with UTC time zone.',
DIMO_DefinitionID String COMMENT 'ID for the vehicles definition',
DIMO_Source String COMMENT 'where the data was sourced from',
DIMO_Subject String COMMENT 'subjet of this vehicle data',
DIMO_Timestamp DateTime COMMENT 'timestamp of when this data was colllected',
DIMO_Timestamp DateTime('UTC') COMMENT 'timestamp of when this data was colllected',
DIMO_Type String COMMENT 'type of data collected',
DIMO_VehicleID String COMMENT 'unque DIMO ID for the vehicle',
Exterior_AirTemperature Float32 COMMENT 'Air temperature outside the vehicle.',
Expand Down
4 changes: 2 additions & 2 deletions schema/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"originalName": "data.timestamp",
"originalType": "string"
},
"clickHouseType": "DateTime",
"clickHouseType": "DateTime('UTC')",
"goType": "time.Time",
"isArray": false
},
Expand Down Expand Up @@ -250,7 +250,7 @@
},
{
"vspecName": "Vehicle.DIMO.Timestamp",
"clickHouseType": "DateTime",
"clickHouseType": "DateTime('UTC')",
"goType": "time.Time",
"isArray": false,
"conversion": {
Expand Down

0 comments on commit d6fb590

Please sign in to comment.