0
votes

I have to Extract the varbinary column in a file. When I tried to extract it with byte[]. It show the error "Conversion Error. Column having invalid characters".

U-SQL Script:

EXTRACT Id int?,createddate DateTime?,Photo byte[] FROM @input USING Extractors.Csv(quoting: true,nullEscape:"\N");

1

1 Answers

2
votes

The built-in Csv/Tsv/Text extractors assume that they operate on textual data, where the binary content is hex-encoded. This is necessary, since the binary otherwise could contain any of the delineation characters. See https://msdn.microsoft.com/en-us/library/azure/mt621366.aspx under byte[].

So if your photo is not hex-encoded, you would have to write your own custom extractor.