-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KH-541: Ozone Analytics Queries to flatten Locations (#9)
- Loading branch information
Showing
4 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT into locations SELECT t.* from analytics.analytics.locations t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
CREATE TABLE locations ( | ||
location_id BIGINT, | ||
name VARCHAR, | ||
description VARCHAR, | ||
address1 VARCHAR, | ||
address2 VARCHAR, | ||
city_village VARCHAR, | ||
state_province VARCHAR, | ||
postal_code VARCHAR, | ||
country VARCHAR, | ||
latitude VARCHAR, | ||
longitude VARCHAR, | ||
creator BIGINT, | ||
date_created TIMESTAMP, | ||
county_district VARCHAR, | ||
address3 VARCHAR, | ||
address4 VARCHAR, | ||
address5 VARCHAR, | ||
address6 VARCHAR, | ||
retired BOOLEAN, | ||
retired_by BIGINT, | ||
date_retired TIMESTAMP, | ||
retire_reason VARCHAR, | ||
parent_location BIGINT, | ||
uuid VARCHAR, | ||
changed_by BIGINT, | ||
date_changed TIMESTAMP, | ||
address7 VARCHAR, | ||
address8 VARCHAR, | ||
address9 VARCHAR, | ||
address10 VARCHAR, | ||
address11 VARCHAR, | ||
address12 VARCHAR, | ||
address13 VARCHAR, | ||
address14 VARCHAR, | ||
address15 VARCHAR | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
SELECT | ||
location_id, | ||
name, | ||
description, | ||
address1, | ||
address2, | ||
city_village, | ||
state_province, | ||
postal_code, | ||
country, | ||
latitude, | ||
longitude, | ||
creator, | ||
date_created, | ||
county_district, | ||
address3, | ||
address4, | ||
address5, | ||
address6, | ||
retired, | ||
retired_by, | ||
date_retired, | ||
retire_reason, | ||
parent_location, | ||
uuid, | ||
changed_by, | ||
date_changed, | ||
address7, | ||
address8, | ||
address9, | ||
address10, | ||
address11, | ||
address12, | ||
address13, | ||
address14, | ||
address15 | ||
FROM | ||
location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters