69 lines
1.4 KiB
Plaintext
69 lines
1.4 KiB
Plaintext
@raw_parsed = EXTRACT child_id int,
|
|
s_store_sk string,
|
|
s_store_id string,
|
|
s_rec_start_date string,
|
|
s_rec_end_date string,
|
|
s_closed_date_sk string,
|
|
s_store_name string,
|
|
s_number_employees string,
|
|
s_floor_space string,
|
|
s_hours string,
|
|
s_manager string,
|
|
s_market_id string,
|
|
s_geography_class string,
|
|
s_market_desc string,
|
|
s_market_manager string,
|
|
s_division_id string,
|
|
s_division_name string,
|
|
s_company_id string,
|
|
s_company_name string,
|
|
s_street_number string,
|
|
s_street_name string,
|
|
s_street_type string,
|
|
s_suite_number string,
|
|
s_city string,
|
|
s_county string,
|
|
s_state string,
|
|
s_zip string,
|
|
s_country string,
|
|
s_gmt_offset string,
|
|
s_tax_precentage string,
|
|
empty string
|
|
FROM "wasb://store@<blob storage account name>/{*}_{child_id}_100.dat"
|
|
USING Extractors.Text(delimiter: '|');
|
|
|
|
@filtered_results = SELECT s_store_sk,
|
|
s_store_id,
|
|
s_rec_start_date,
|
|
s_rec_end_date,
|
|
s_closed_date_sk,
|
|
s_store_name,
|
|
s_number_employees,
|
|
s_floor_space,
|
|
s_hours,
|
|
s_manager,
|
|
s_market_id,
|
|
s_geography_class,
|
|
s_market_desc,
|
|
s_market_manager,
|
|
s_division_id,
|
|
s_division_name,
|
|
s_company_id,
|
|
s_company_name,
|
|
s_street_number,
|
|
s_street_name,
|
|
s_street_type,
|
|
s_suite_number,
|
|
s_city,
|
|
s_county,
|
|
s_state,
|
|
s_zip,
|
|
s_country,
|
|
s_gmt_offset,
|
|
s_tax_precentage
|
|
FROM @raw_parsed;
|
|
|
|
OUTPUT @filtered_results
|
|
TO "/last_available_year/store.csv"
|
|
USING Outputters.Csv(outputHeader: true);
|
|
|