2017-07-19 05:47:58 +08:00
|
|
|
@raw_parsed = EXTRACT child_id int,
|
|
|
|
t_time_sk string,
|
|
|
|
t_time_id string,
|
|
|
|
t_time string,
|
|
|
|
t_hour string,
|
|
|
|
t_minute string,
|
|
|
|
t_second string,
|
|
|
|
t_am_pm string,
|
|
|
|
t_shift string,
|
|
|
|
t_sub_shift string,
|
|
|
|
t_meal_time string,
|
|
|
|
empty string
|
2017-08-03 05:06:14 +08:00
|
|
|
FROM "wasb://time-dim@<blob storage account name>/{*}_{child_id}_100.dat"
|
2017-07-19 05:47:58 +08:00
|
|
|
USING Extractors.Text(delimiter: '|');
|
|
|
|
|
|
|
|
@filtered_results = SELECT t_time_sk,
|
|
|
|
t_time_id,
|
|
|
|
t_time,
|
|
|
|
t_hour,
|
|
|
|
t_minute,
|
|
|
|
t_second,
|
|
|
|
t_am_pm,
|
|
|
|
t_shift,
|
|
|
|
t_sub_shift,
|
|
|
|
t_meal_time
|
|
|
|
FROM @raw_parsed
|
|
|
|
ORDER BY child_id ASC
|
|
|
|
FETCH 100 ROWS;
|
|
|
|
|
|
|
|
OUTPUT @filtered_results
|
|
|
|
TO "/modelling/time_dim.csv"
|
|
|
|
USING Outputters.Csv(outputHeader: true);
|
|
|
|
|