Is there any way in the U-SQL extract statement to only specify the input columns that I care about? I'm working with a legacy database that exports several tables to csv that has about 200 columns. I only care about 10 of those fields. I was hoping to do something like:
EXTRACT CustomerID:0 string,
StoreNumber:5 double,
ReceiptNumber:20 double,
Timestamp:125 int
FROM "somefile.csv"
USING Extractors.Csv();
So the idea would be to specify an index that corresponds to which column the data comes from.
Is there anything like that in the works? Or do I always need to define all 200 columns? I'm open to other solutions as well. Thanks!
You can write your custom extractor code. Use the sample extractors at https://github.com/Azure/usql/tree/master/Examples/DataFormats/Microsoft.Analytics.Samples.Formats as guidance.