Error extracting rows from Azure billing information response

Summary

The user is trying to build a connector to extract billing information from Azure but is facing an error when trying to extract rows from the response. The error message ‘list indices must be integers or slices, not float’ is encountered.


Question

Hi everyone :wave:, I’m trying to build a connector to extract billing information from Azure. I get a response following this schema using this endpoint:

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{{ config[‘billing_account_id’] }}/providers/Microsoft.CostManagement/query?api-version=2023-11-01

  "$schema": "<http://json-schema.org/schema#>",
  "properties": {
    "columns": {
      "items": {
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "rows": {
      "items": {
        "items": {
          "type": [
            "number",
            "string"
          ]
        },
        "type": "array"
      },
      "type": "array"
    }
  },
  "type": "object"
}```
I’m trying to output rows, but when using _*[ properties, rows ]*_ as Record selector, I get the following error:

```list indices must be integers or slices, not float```
I can extract all rows in one cell but it isn’t very clean when I try to read data in BigQuery... Do you have any idea on how I could solve this :pray: I’ve tried my best but I can’t find any solution using the Custom Connector interface...

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C027KKE4BCZ/p1710263682702049) if you want to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["azure", "billing-information", "connector", "json-schema", "custom-connector", "error"]
</sub>

I found <How to choose the proper record selector · airbytehq/airbyte · Discussion #32748 · GitHub related thread in Github> :thinking_face: