Hello people!
I am trying to find a way to connect data from a BigQuery table I have, I found a potential way to do it: By using its API.
I was able to connect correctly, using a service account , when I then create the integration and I test the connection, I do get the response with
So, as you see the response brings the rows on it, but then when I go to the data source, it does not show me the rows, only kind, etag and totalrows columns, any idea on how to create the table based on the response I get?
Discussion posts and replies are publicly visible
So are you trying to create a record type with this integrationas the source? Usually the best way to do that is to use dot notation to index into the rowsList varaiable. Usually, I see this done by creating a separate expression rule and then using the expression rule to format your results. You should be able to return the total rows data like this:
rule!SAMPLE_YourIntegrationRuleName().totalRows
Hello, yes what I want in the end, is to show the rows coming on the JSON response , as a table on Appian
With the code you ageve me, I guess I need to create a new expression rule , and it may look like this
rule!SAMPLE_TGSU_bigquery().totalRows
am I right?
Yes that's correct - once you create that expression rule, it should return the list of all the data from the integration. So then it's up to you how you want to use it - you could use a grid (see this tutorial: docs.appian.com/.../Grid_Tutorial.html) using the results of your rule.
Got it, not sure if I'm doing something wrong, I went to my app>'objects'>'New'>'Expression Rule'
this opened a new tab with the text editor there and I pasted rule!SAMPLE_TGSU_bigquery().totalRows
Then I did 'Test rule' and on Test output, I got an error:
Expression evaluation error at function rule!SAMPLE_TGSU_bigquery: Invalid function rule!SAMPLE_TGSU_bigquery (not available as [rule])
Do you have any insights?
Oh I just suggested SAMPLE as an example - you'll need to just use whatever the name of your integration was. It should also auto-complete when you type in rule! and begin to type.
Great! I tried that and this seems to work, thanks Peter. However, I get the test output as
Time 3,919 ms (View Performance)
Type Null
Value
So I guess this did not give me the rows, as I then tried to create the interface, and selected read only grid and selected rule from data source, but it does not return any values there.
Ah is it possible there are other results prior to the "totalRows"? If you call the rule by itself (without the ".totalRows"), what do you see? You might need to try to index other items like ".result.body.totalRows" or something like that. Any item you see in the response can be indexed into using that dot notation.
Awesome! I think I get it now, this worked and I can see the response and get through it, you rock man!
Nice, glad that worked!