Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Empty records in Table

Greetings,

 

I have been going round and round, using solutions from the forum.

The code runs, but returns a column with empty tables. 

 

// REST to Table
let
    JSONtoTable = let
    cfaURL = myurl,
    cfatoken = mytoken,
      
    SourceContent = Json.Document(Web.Contents(cfaURL & Text.From(cfatoken))),
    //SourceContent = Json.Document(Web.Contents(cfaURL & cfatoken)),
    data = SourceContent[fields],
    #"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"objectid", "cfa_id", "farm_holding_name", "land_owner", "tenant_leasehold_occupier", "globalid", "Shape__Area", "Shape__Length", "geometryField"})
in
    #"Expanded Column1"
in
    JSONtoTable

 

The output:

 

I would really appreciate any assistance to resolve this.

2 Replies

  • AlB's avatar
    AlB
    Community Champion

    Hi Anonymous 

    Have you got example values for  myurl, mytoken ? So that we can run  a test on something real.

     

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers 

     

  • Hi Anonymous 

    Have you tried entering the url/token into your browser to see what is returned?

    Phil


    If I answered your question please mark my post as the solution.
    If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.