2017-07-19 05:47:58 +08:00
|
|
|
@raw_parsed = EXTRACT child_id int,
|
|
|
|
wp_web_page_sk string,
|
|
|
|
wp_web_page_id string,
|
|
|
|
wp_rec_start_date string,
|
|
|
|
wp_rec_end_date string,
|
|
|
|
wp_creation_date_sk string,
|
|
|
|
wp_access_date_sk string,
|
|
|
|
wp_autogen_flag string,
|
|
|
|
wp_customer_sk string,
|
|
|
|
wp_url string,
|
|
|
|
wp_type string,
|
|
|
|
wp_char_count string,
|
|
|
|
wp_link_count string,
|
|
|
|
wp_image_count string,
|
|
|
|
wp_max_ad_count string,
|
|
|
|
empty string
|
2017-08-03 05:06:14 +08:00
|
|
|
FROM "wasb://web-page@<blob storage account name>/{*}_{child_id}_100.dat"
|
2017-07-19 05:47:58 +08:00
|
|
|
USING Extractors.Text(delimiter: '|');
|
|
|
|
|
|
|
|
@filtered_results = SELECT wp_web_page_sk,
|
|
|
|
wp_web_page_id,
|
|
|
|
wp_rec_start_date,
|
|
|
|
wp_rec_end_date,
|
|
|
|
wp_creation_date_sk,
|
|
|
|
wp_access_date_sk,
|
|
|
|
wp_autogen_flag,
|
|
|
|
wp_customer_sk,
|
|
|
|
wp_url,
|
|
|
|
wp_type,
|
|
|
|
wp_char_count,
|
|
|
|
wp_link_count,
|
|
|
|
wp_image_count,
|
|
|
|
wp_max_ad_count
|
|
|
|
FROM @raw_parsed
|
|
|
|
ORDER BY child_id ASC
|
|
|
|
FETCH 100 ROWS;
|
|
|
|
|
|
|
|
OUTPUT @filtered_results
|
|
|
|
TO "/modelling/web_page.csv"
|
|
|
|
USING Outputters.Csv(outputHeader: true);
|
|
|
|
|