Reputation: 1
USE DATABASE retail;
@log=EXTRACT id int,
item string
FROM "/Retailstock/stock.txt"
USING Extractors.Tsv();
INSERT INTO sales.stock
SELECT id, item FROM @log;
It is the question from Azure data lake analytics course. I need to load the table sales.stock with sales schema. It gives vertex error and encoding error.
I can't understand the problem after head banging for 2 days. Thanks.
Upvotes: 0
Views: 395
Reputation: 802
In my case setting the encoding to ASCII in the Extractors.Text() / Extractors.Tsv() did not work. Not sure why, since the file is clearly in the ASCII encoding. I've had to manually convert the file to UTF-8.
Upvotes: 0
Reputation: 432
It might be due to encoding mismatch. Extractors have a default encoding set to UTF8, and in case the encoding of your source file is different a runtime error will happen during extraction.
You can change the encoding by providing "encoding" parameter, e.g:
USING Extractors.Text(encoding : Encoding.[ASCII]);
See more about supported encodings here: Extractor parameters - encoding
Upvotes: 1