Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Encoding

I created a nifty little big data extraction from multiple endpoints to ADLS gen2. I have full control of the encoding of the blobs in the data lake endpoint.   Currently I'm using iso-8859-1 (UTF-...
  • Anonymous's avatar
    Anonymous
    6 years ago
    Instead of transforming the column to JSON, you have to use Add Custom Column and type the right expression according to this syntax:

    Json.Document(jsonText as any, optional encoding as nullable number) as any

    Here's the documentation of the function:

    https://docs.microsoft.com/en-us/powerquery-m/json-document

    Best
    D
  • Anonymous's avatar
    Anonymous
    6 years ago

    It actually worked when I changed the line above from:

    #"Added Custom" = Table.AddColumn(#"Content", "JSON", each Json.Document([#"Content"], TextEncoding.Utf8)),

     

    to:

    #"Added Custom" = Table.AddColumn(#"Content", "JSON", each Json.Document([#"Content"], TextEncoding.Windows)),

     

    Thanks, darlove!