Created
May 14, 2019 00:43
-
-
Save jthandy/b96e74644391ba27c34ebf4c293c939f to your computer and use it in GitHub Desktop.
a test dataset for some work with Redshift flattening.
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
create table dbt_jthandy.flatten_test ( | |
order_id int, | |
json_text varchar(1000) | |
) | |
; | |
insert into dbt_jthandy.flatten_test | |
(order_id, json_text) | |
values | |
(1, '{ | |
"items":[ | |
{ | |
"id":"fa4b6cd3-4719-4b97-848b-7f2025f5e693", | |
"quantity":1, | |
"sku":"M900353-SWB-RYL-2", | |
"list_price":60.0 | |
}, | |
{ | |
"id":"c39f9474-a278-4162-9cfa-aa068f4e1665", | |
"quantity":1, | |
"sku":"F033199-SWB-FWL-1", | |
"list_price":20.0 | |
} | |
]}') | |
; | |
insert into dbt_jthandy.flatten_test | |
(order_id, json_text) | |
values | |
(2, '{ | |
"items":[ | |
{ | |
"id":"fa4b6cd3-4719-4b97-848b-7f2025f5e693", | |
"quantity":1, | |
"sku":"M900353-SWB-RYL-2", | |
"list_price":60.0 | |
} | |
]}') | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment