2017-07-19 05:47:58 +08:00
|
|
|
@raw_parsed = EXTRACT child_id int,
|
|
|
|
hd_demo_sk string,
|
|
|
|
hd_income_band_sk string,
|
|
|
|
hd_buy_potential string,
|
|
|
|
hd_dep_count string,
|
|
|
|
hd_vehicle_count string,
|
|
|
|
empty string
|
2017-08-03 05:06:14 +08:00
|
|
|
FROM "wasb://household-demographics@<blob storage account name>/{*}_{child_id}_100.dat"
|
2017-07-19 05:47:58 +08:00
|
|
|
USING Extractors.Text(delimiter: '|');
|
|
|
|
|
|
|
|
@filtered_results = SELECT hd_demo_sk,
|
|
|
|
hd_income_band_sk,
|
|
|
|
hd_buy_potential,
|
|
|
|
hd_dep_count,
|
|
|
|
hd_vehicle_count
|
|
|
|
FROM @raw_parsed
|
|
|
|
ORDER BY child_id ASC
|
|
|
|
FETCH 100 ROWS;
|
|
|
|
|
|
|
|
OUTPUT @filtered_results
|
|
|
|
TO "/modelling/household_demographics.csv"
|
|
|
|
USING Outputters.Csv(outputHeader: true);
|
|
|
|
|