shubham srivastava
shubham srivastava

Reputation: 1

Vertex error, encoding error in azure data lake analytics while loading data. The appropriate reasons can be?

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

Answers (2)

saso
saso

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

maya-msft
maya-msft

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

Related Questions