Skip to main content
rodrigoe0001
October 15, 2021
Solved

How to get a json response I also got converted to map, to be available as data source to create records?

  • October 15, 2021
  • 14 replies
  • 1 view

Hi everyone!

I am working with BigQuery, and I have been able to get the response from a database I have there, the data comes in JSON format, so with a help of an Appian expert, we were able to create a dictionary to make it show from this:

to this:

Now, I need to create records based on this data, just as you can do with the spaceX exercise, where you get data from API, and make a record based on that data without storing it on a table or data base in Appian. 

So, I want to do that with this data but when I try to create a record with the dictionary I showed above, I get this error:

I guess is because I am no longer getting the response directly from the API or web service, and I'm manipulating it to create the dictionary, so I was thinking on doing an a!map function but I have not been able to succeed

Any insight onhow I can get a record to display that data?

PS. I need to have it as a record to create a user filter view, to filter some of the fields I'm getting from the response.

Thanks in advance for your time.

    Best answer by mikes0011

    As that error message indicates, your expression rule would need to be reconfigured to return a DataSubset (or create a new expression rule that takes the result from the original one and wraps it in a dataSubset, i.e. using toDataSubset(), where you pass through the pagingInfo value from a rule input you create.

    The result would look something like this:

    todatasubset(
      arrayToPage: rule!TSGU_IndexRows(),
      pagingConfiguration: ri!pagingInfo
    )

    14 replies

    danny.verb
    October 15, 2021

    Which functions are you using the get your data from BigQuery? If you're using queryEntity then you should be able to choose RDBMS as the database option

    rodrigoe0001
    October 15, 2021

    I'm actually getting the data using aconnected system of HTTP type, then I use integrations to get the correct URL to display the data and it returns the data from the bigquery table as shown on the first screenshot above. 

    From there, I then use a rule to get data to have a dictionary to kind of try to get a key: value thing to show it or have it on a record, however, as you see on the second screenshot, I do get the dictionary created, but then if I try to use it on a record, I get the error. 

    So, I'm not using functions to get the data and not sure what queryentity does but I'm certainly not using that either. 

    danny.verb
    October 15, 2021

    My guess is you're using some function in your expression rule that is not supported for web service backed record types