Analysis-Services/UsqlScripts/Modelling/household_demographics.usql

23 lines
592 B
Plaintext

@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
FROM "wasb://household-demographics@aasuseast2/{*}_{child_id:*}_100.dat"
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);