{
  "GlobalSettings": {
    "type": "dynamic"
  },
  "vectors": [
    {
      "URL": "$BaseURL.snowflakecomputing.com/api/v2/statements",
      "URLSetting": {
        "requestType": "post",
        "requestBody": "%7B%0A%20%20%22statement%22%3A%20%22SELECT%20aa.org%2C%20aa.reg%2C%20aa.acc%2C%20DATABASE_NAME%2C%20AVG(BYTES_TRANSFERRED)%20AS%20avg_credit_used%2C%20SUM(BYTES_TRANSFERRED)%20AS%20sum_credit_used%2C%20AVG(CREDITS_USED)%20AS%20avg_bytes_transferred%2C%20SUM(CREDITS_USED)%20AS%20sum_bytes_transferred%20FROM%20SNOWFLAKE.ACCOUNT_USAGE.REPLICATION_USAGE_HISTORY%20CROSS%20JOIN%20(SELECT%20CURRENT_ORGANIZATION_NAME()%20AS%20org%2C%20CURRENT_ACCOUNT_NAME()%20AS%20acc%2C%20CURRENT_REGION()%20AS%20reg)%20AS%20aa%20WHERE%20DATE_PART(%27EPOCH_MILLISECOND%27%2C%20start_time)%20%3E%3D%20%7B%24start_time%7D%20GROUP%20BY%20aa.org%2C%20aa.acc%2C%20aa.reg%2C%20DATABASE_NAME%3B%22%2C%0A%20%20%22timeout%22%3A%2060%2C%0A%20%20%22warehouse%22%3A%20%22COMPUTE_WH%22%0A%7D",
        "requestHeaders": [
          "Authorization:Bearer $AuthToken",
          "Accept:application/json",
          "Content-Type:application/json",
          "X-Snowflake-Authorization-Token-Type:KEYPAIR_JWT"
        ]
      },
      "metrics": [
        {
          "mPath": "$.data[*]",
          "attribute": [
            {
              "name": "[4]",
              "index": 1,
              "operation": "none",
              "type": 1
            },
            {
              "name": "[5]",
              "index": 2,
              "operation": "none",
              "type": 1
            },
            {
              "name": "[6]",
              "index": 3,
              "operation": "none",
              "type": 1
            },
            {
              "name": "[7]",
              "index": 4,
              "operation": "none",
              "type": 1
            }
          ]
        }
      ],
      "path": [
        {
          "isPartOfHierarchy": true,
          "query": "$.data[*][0]",
          "replaceVectorKey": "Organization_Name",
          "defName": "Unknown Organization"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.data[*][1]",
          "replaceVectorKey": "Region_Name",
          "defName": "Unknown Region"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.data[*][2]",
          "replaceVectorKey": "Account_Name",
          "defName": "Unknown Account"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.data[*][3]",
          "replaceVectorKey": "Database_Name",
          "defName": "Unknown Database"
        }
      ]
    }
  ]
}
