Analysis-Services/UsqlScripts/last_available_year/inventory.usql

19 lines
507 B
Plaintext
Raw Normal View History

@raw_parsed = EXTRACT child_id int,
nv_date_sk string,
nv_item_sk string,
nv_warehouse_sk string,
nv_quantity_on_hand string,
empty string
FROM "wasb://inventory@<blob storage account name>/{*}_{child_id}_100.dat"
USING Extractors.Text(delimiter: '|');
@filtered_results = SELECT nv_date_sk,
nv_item_sk,
nv_warehouse_sk,
nv_quantity_on_hand
FROM @raw_parsed;
OUTPUT @filtered_results
TO "/last_available_year/inventory.csv"
USING Outputters.Csv(outputHeader: true);