@raw_parsed = EXTRACT child_id int, ws_sold_date_sk string, ws_sold_time_sk string, ws_ship_date_sk string, ws_item_sk string, ws_bill_customer_sk string, ws_bill_cdemo_sk string, ws_bill_hdemo_sk string, ws_bill_addr_sk string, ws_ship_customer_sk string, ws_ship_cdemo_sk string, ws_ship_hdemo_sk string, ws_ship_addr_sk string, ws_web_page_sk string, ws_web_site_sk string, ws_ship_mode_sk string, ws_warehouse_sk string, ws_promo_sk string, ws_order_number string, ws_quantity string, ws_wholesale_cost string, ws_list_price string, ws_sales_price string, ws_ext_discount_amt string, ws_ext_sales_price string, ws_ext_wholesale_cost string, ws_ext_list_price string, ws_ext_tax string, ws_coupon_amt string, ws_ext_ship_cost string, ws_net_paid string, ws_net_paid_inc_tax string, ws_net_paid_inc_ship string, ws_net_paid_inc_ship_tax string, ws_net_profit string, empty string FROM "wasb://web-sales@aasuseast2/{*}_{child_id:*}_100.dat" USING Extractors.Text(delimiter: '|'); @filtered_results = SELECT ws_sold_date_sk, ws_sold_time_sk, ws_ship_date_sk, ws_item_sk, ws_bill_customer_sk, ws_bill_addr_sk, ws_ship_hdemo_sk, ws_ship_addr_sk, ws_web_page_sk, ws_web_site_sk, ws_ship_mode_sk, ws_warehouse_sk, ws_promo_sk, ws_order_number, ws_quantity, ws_wholesale_cost, ws_list_price, ws_sales_price, ws_ext_discount_amt, ws_ext_sales_price, ws_ext_wholesale_cost, ws_ext_list_price, ws_ext_ship_cost, ws_net_paid, ws_net_profit FROM @raw_parsed ORDER BY child_id ASC FETCH 100 ROWS; OUTPUT @filtered_results TO "/modelling/web_sales.csv" USING Outputters.Csv(outputHeader: true);