l4esitewise_pipeline_cfn/sitewise_export_s3.yml [515:551]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    SELECT "date_format"("date_trunc"('minute', "timestamp"), '%Y-%m-%dT%H:%i:%S.%f') "Timestamp"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor0') THEN "asset_property_value" ELSE null END)) AS double) "Sensor0"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor1') THEN "asset_property_value" ELSE null END)) AS double) "Sensor1"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor2') THEN "asset_property_value" ELSE null END)) AS double) "Sensor2"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor3') THEN "asset_property_value" ELSE null END)) AS double) "Sensor3"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor4') THEN "asset_property_value" ELSE null END)) AS double) "Sensor4"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor5') THEN "asset_property_value" ELSE null END)) AS double) "Sensor5"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor6') THEN "asset_property_value" ELSE null END)) AS double) "Sensor6"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor7') THEN "asset_property_value" ELSE null END)) AS double) "Sensor7"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor8') THEN "asset_property_value" ELSE null END)) AS double) "Sensor8"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor9') THEN "asset_property_value" ELSE null END)) AS double) "Sensor9"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor10') THEN "asset_property_value" ELSE null END)) AS double) "Sensor10"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor11') THEN "asset_property_value" ELSE null END)) AS double) "Sensor11"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor12') THEN "asset_property_value" ELSE null END)) AS double) "Sensor12"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor13') THEN "asset_property_value" ELSE null END)) AS double) "Sensor13"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor14') THEN "asset_property_value" ELSE null END)) AS double) "Sensor14"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor15') THEN "asset_property_value" ELSE null END)) AS double) "Sensor15"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor16') THEN "asset_property_value" ELSE null END)) AS double) "Sensor16"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor17') THEN "asset_property_value" ELSE null END)) AS double) "Sensor17"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor18') THEN "asset_property_value" ELSE null END)) AS double) "Sensor18"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor19') THEN "asset_property_value" ELSE null END)) AS double) "Sensor19"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor20') THEN "asset_property_value" ELSE null END)) AS double) "Sensor20"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor21') THEN "asset_property_value" ELSE null END)) AS double) "Sensor21"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor22') THEN "asset_property_value" ELSE null END)) AS double) "Sensor22"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor23') THEN "asset_property_value" ELSE null END)) AS double) "Sensor23"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor24') THEN "asset_property_value" ELSE null END)) AS double) "Sensor24"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor25') THEN "asset_property_value" ELSE null END)) AS double) "Sensor25"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor26') THEN "asset_property_value" ELSE null END)) AS double) "Sensor26"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor27') THEN "asset_property_value" ELSE null END)) AS double) "Sensor27"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor28') THEN "asset_property_value" ELSE null END)) AS double) "Sensor28"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor29') THEN "asset_property_value" ELSE null END)) AS double) "Sensor29"
                    FROM( 
                    SELECT "from_unixtime"(("time_in_seconds" + ("offset_in_nanos" / 1000000000))) "timestamp"
                    , "metadata"."asset_name", "metadata"."asset_property_name", "data"."asset_property_value"
                    , "metadata"."asset_property_unit", "metadata"."asset_property_alias"
                    FROM (sitewise2s3_firehose_glue_database.sitewise2s3_firehose_glue_table data
                    INNER JOIN sitewise2s3_firehose_glue_database.sitewise2s3_firehose_glue_table_metadata metadata ON (("data"."asset_id" = "metadata"."asset_id") AND ("data"."asset_property_id" = "metadata"."asset_property_id")))) 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



l4esitewise_pipeline_cfn/sitewise_export_s3.yml [565:601]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    SELECT "date_format"("date_trunc"('minute', "timestamp"), '%Y-%m-%dT%H:%i:%S.%f') "Timestamp"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor0') THEN "asset_property_value" ELSE null END)) AS double) "Sensor0"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor1') THEN "asset_property_value" ELSE null END)) AS double) "Sensor1"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor2') THEN "asset_property_value" ELSE null END)) AS double) "Sensor2"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor3') THEN "asset_property_value" ELSE null END)) AS double) "Sensor3"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor4') THEN "asset_property_value" ELSE null END)) AS double) "Sensor4"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor5') THEN "asset_property_value" ELSE null END)) AS double) "Sensor5"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor6') THEN "asset_property_value" ELSE null END)) AS double) "Sensor6"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor7') THEN "asset_property_value" ELSE null END)) AS double) "Sensor7"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor8') THEN "asset_property_value" ELSE null END)) AS double) "Sensor8"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor9') THEN "asset_property_value" ELSE null END)) AS double) "Sensor9"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor10') THEN "asset_property_value" ELSE null END)) AS double) "Sensor10"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor11') THEN "asset_property_value" ELSE null END)) AS double) "Sensor11"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor12') THEN "asset_property_value" ELSE null END)) AS double) "Sensor12"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor13') THEN "asset_property_value" ELSE null END)) AS double) "Sensor13"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor14') THEN "asset_property_value" ELSE null END)) AS double) "Sensor14"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor15') THEN "asset_property_value" ELSE null END)) AS double) "Sensor15"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor16') THEN "asset_property_value" ELSE null END)) AS double) "Sensor16"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor17') THEN "asset_property_value" ELSE null END)) AS double) "Sensor17"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor18') THEN "asset_property_value" ELSE null END)) AS double) "Sensor18"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor19') THEN "asset_property_value" ELSE null END)) AS double) "Sensor19"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor20') THEN "asset_property_value" ELSE null END)) AS double) "Sensor20"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor21') THEN "asset_property_value" ELSE null END)) AS double) "Sensor21"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor22') THEN "asset_property_value" ELSE null END)) AS double) "Sensor22"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor23') THEN "asset_property_value" ELSE null END)) AS double) "Sensor23"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor24') THEN "asset_property_value" ELSE null END)) AS double) "Sensor24"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor25') THEN "asset_property_value" ELSE null END)) AS double) "Sensor25"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor26') THEN "asset_property_value" ELSE null END)) AS double) "Sensor26"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor27') THEN "asset_property_value" ELSE null END)) AS double) "Sensor27"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor28') THEN "asset_property_value" ELSE null END)) AS double) "Sensor28"
                    , CAST("max"((CASE WHEN ("asset_property_name" = 'Sensor29') THEN "asset_property_value" ELSE null END)) AS double) "Sensor29"
                    FROM( 
                    SELECT "from_unixtime"(("time_in_seconds" + ("offset_in_nanos" / 1000000000))) "timestamp"
                    , "metadata"."asset_name", "metadata"."asset_property_name", "data"."asset_property_value"
                    , "metadata"."asset_property_unit", "metadata"."asset_property_alias"
                    FROM (sitewise2s3_firehose_glue_database.sitewise2s3_firehose_glue_table data
                    INNER JOIN sitewise2s3_firehose_glue_database.sitewise2s3_firehose_glue_table_metadata metadata ON (("data"."asset_id" = "metadata"."asset_id") AND ("data"."asset_property_id" = "metadata"."asset_property_id")))) 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



