Analysis-Services/UsqlScripts/large_multiple/warehouse.usql

40 lines
883 B
Plaintext
Raw Normal View History

@raw_parsed = EXTRACT child_id int,
w_warehouse_sk string,
w_warehouse_id string,
w_warehouse_name string,
w_warehouse_sq_ft string,
w_street_number string,
w_street_name string,
w_street_type string,
w_suite_number string,
w_city string,
w_county string,
w_state string,
w_zip string,
w_country string,
w_gmt_offset string,
empty string
FROM "wasb://warehouse@<blob storage account name>/{*}_{child_id}_100.dat"
USING Extractors.Text(delimiter: '|');
@filtered_results = SELECT w_warehouse_sk,
w_warehouse_id,
w_warehouse_name,
w_warehouse_sq_ft,
w_street_number,
w_street_name,
w_street_type,
w_suite_number,
w_city,
w_county,
w_state,
w_zip,
w_country,
w_gmt_offset
FROM @raw_parsed
WHERE child_id BETWEEN 1 AND 100;
OUTPUT @filtered_results
TO "/large_multiple/warehouse.csv"
USING Outputters.Csv(outputHeader: true);