31 lines
788 B
Plaintext
31 lines
788 B
Plaintext
|
@raw_parsed = EXTRACT child_id int,
|
||
|
cd_demo_sk string,
|
||
|
cd_gender string,
|
||
|
cd_marital_status string,
|
||
|
cd_education_status string,
|
||
|
cd_purchase_estimate string,
|
||
|
cd_credit_rating string,
|
||
|
cd_dep_count string,
|
||
|
cd_dep_employed_count string,
|
||
|
cd_dep_college_count string,
|
||
|
empty string
|
||
|
FROM "wasb://customer-demographics@aasuseast2/{*}_{child_id:*}_100.dat"
|
||
|
USING Extractors.Text(delimiter: '|');
|
||
|
|
||
|
@filtered_results = SELECT cd_demo_sk,
|
||
|
cd_gender,
|
||
|
cd_marital_status,
|
||
|
cd_education_status,
|
||
|
cd_purchase_estimate,
|
||
|
cd_credit_rating,
|
||
|
cd_dep_count,
|
||
|
cd_dep_employed_count,
|
||
|
cd_dep_college_count
|
||
|
FROM @raw_parsed
|
||
|
ORDER BY child_id ASC
|
||
|
FETCH 100 ROWS;
|
||
|
|
||
|
OUTPUT @filtered_results
|
||
|
TO "/modelling/customer_demographics.csv"
|
||
|
USING Outputters.Csv(outputHeader: true);
|
||
|
|