BigQuery - Apigee API - Outsystems Issue
Application Type
Traditional Web

Hi all,

I have a specific problem with a traditional web app I am working on, the business is very critical of additional components, and databases and hence I have no ability to use either the internal DB in Outsystems or install any 3rd party components within Outsystems (not great I know)

I have my data in Google BigQuery, and I'm using the APIgee API, with a pre-defined output from the query, I am also having to use legacy SQL in the Request to the API.

Anyway, after consuming the API, I have mocked up the output below, but Outsystems can't deal directly with the response, as its very heavily nested, I need to be able to use this output as-is in the application but display the data and have the ability to aggregate, sum, and filter dynamic tables based on the output, and without using the internal DB.

Is this possible to do, and is it easily repeatable for other datasets without havig to continually rewrite processes.


Thanks in advance, and looking forward to seeing your suggestions.


Generated JSON after consuming the API.

{

  "kind": "myQueryfromAPI",

  "schema": {

    "fields": [

      {

        "name": "f0_",

        "type": "RECORD",

        "mode": "NULLABLE",

        "fields": [

          {

            "name": "TEST_ONE",

            "type": "STRING",

            "mode": "NULLABLE"

          },

          {

            "name": "TEST_TWO",

            "type": "STRING",

            "mode": "NULLABLE"

          },

          {

            "name": "TEST_THREE",

            "type": "STRING",

            "mode": "NULLABLE"

          },

          {

            "name": "TEST_FOUR",

            "type": "STRING",

            "mode": "NULLABLE"

          }

        ]

      }

    ]

  },

  "jobReference": {

    "projectId": "test",

    "jobId": "test",

    "location": "test"

  },

  "totalRows": "4",

  "rows": [

    {

      "f": [

        {

          "v": {

            "f": [

              {

                "v": "01"

              },

              {

                "v": "02"

              },

              {

                "v": "03"

              },

              {

                "v": "04"

              }

            ]

          }

        }

      ]

    },

    {

      "f": [

        {

          "v": {

            "f": [

              {

                "v": "2"

              },

              {

                "v": "3"

              },

              {

                "v": "4"

              },

              {

                "v": "5"

              }

            ]

          }

        }

      ]

    },

    {

      "f": [

        {

          "v": {

            "f": [

              {

                "v": "7"

              },

              {

                "v": "3"

              },

              {

                "v": "4"

              },

              {

                "v": "5"

              }

            ]

          }

        }

      ]

    },

    {

      "f": [

        {

          "v": {

            "f": [

              {

                "v": "yes"

              },

              {

                "v": "no"

              },

              {

                "v": "up"

              },

              {

                "v": "down"

              }

            ]

          }

        }

      ]

    }

  ],

  "totalBytesProcessed": "0",

  "jobComplete": true,

  "cacheHit": true


}

Hello JaKaLi,

The case you are describing is indeed very peculiar, if I am understanding it correctly. Hope I can help with some suggestions:

1) For the JSON you receive from the API, you should use the OnAfterResponse action to customize the response and return as an output a list of objects you want to work. For this, you can use this forge component, that converts a JSON to a List

2) With the now processed list of objects you can iterate through it and execute some operations as you've described (aggregate, sum, and filter), using loops, or system actions.

3) To present this data on the screen, pass the above indicated structured list as the table's datasource.

Let me know if this helped you.

Best regards,

Ricardo

Thanks, yes understand and have used the forge component, but the business this is for have stopped any forge installs as well, so any response has to be written bespoke, or use the currently installed components (basic install)

So for the apigee APIs there anything natively in there that can deal with the consumed API directly?


Hi JaKaLi,

You can consume the apigee APIs directly and instead of installing the forge component, you can implement the component's code directly in the customer's factory. 

Since the component is an extension, you can use the code or dll's and encapsulate it in a new factory component you need to build from scratch.

Due to the imposed limitations by the business, I am not seeing any other solution to help you solve this scenario.

Let me know if this helped you.

Kind regards,

Ricardo

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.