Forum Discussion

diguedesrj's avatar
diguedesrj
Regular Visitor
2 years ago
Solved

Extract data from a database configured in Jason. Base coming from the Postegre bank

Estou procurando dados de um sistema de chamadas de ocorrência de segurança, mas quando trago as tabelas os campos que contêm os relatórios de natureza fato vêm no formato json, como faço para extraí-los?

 

  • Hi diguedesrj, I'm not sure if you prefere RECORD or TABLE:

     

    Output

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wqo5Ryi/KTM/MS8zxS8xNjVGyilEKSs1JLImJKTUwSDMuysyPT0mNz8xLzkxJzStJjTfUKyjRK0hJi1HSiVHKzcxNDaksgGiDiNYqxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [file = _t]),
        Ad_Record = Table.AddColumn(Source, "Record", each Json.Document([file]), type record),
        Ad_Table = Table.AddColumn(Ad_Record, "Table", each Table.FromRecords({[Record]}), type table)
    in
        Ad_Table

2 Replies

  • dufoq3's avatar
    dufoq3
    Community Champion

    Hi diguedesrj, I'm not sure if you prefere RECORD or TABLE:

     

    Output

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wqo5Ryi/KTM/MS8zxS8xNjVGyilEKSs1JLImJKTUwSDMuysyPT0mNz8xLzkxJzStJjTfUKyjRK0hJi1HSiVHKzcxNDaksgGiDiNYqxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [file = _t]),
        Ad_Record = Table.AddColumn(Source, "Record", each Json.Document([file]), type record),
        Ad_Table = Table.AddColumn(Ad_Record, "Table", each Table.FromRecords({[Record]}), type table)
    in
        Ad_Table