{
  "schemaVersion": "1.0",
  "item": {
    "slug": "google-bigquery",
    "name": "Google BigQuery",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/byungkyu/google-bigquery",
    "canonicalUrl": "https://clawhub.ai/byungkyu/google-bigquery",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/google-bigquery",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=google-bigquery",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "LICENSE.txt"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/google-bigquery"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/google-bigquery",
    "agentPageUrl": "https://openagent3.xyz/skills/google-bigquery/agent",
    "manifestUrl": "https://openagent3.xyz/skills/google-bigquery/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/google-bigquery/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Google BigQuery",
        "body": "Access the Google BigQuery API with managed OAuth authentication. Run SQL queries, manage datasets and tables, and analyze data at scale."
      },
      {
        "title": "Quick Start",
        "body": "# Run a simple query\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'query': 'SELECT 1 as test_value', 'useLegacySql': False}).encode()\nreq = urllib.request.Request('https://gateway.maton.ai/google-bigquery/bigquery/v2/projects/{projectId}/queries', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Base URL",
        "body": "https://gateway.maton.ai/google-bigquery/bigquery/v2/{resource-path}\n\nReplace {resource-path} with the actual BigQuery API endpoint path. The gateway proxies requests to bigquery.googleapis.com and automatically injects your OAuth token."
      },
      {
        "title": "Authentication",
        "body": "All requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\""
      },
      {
        "title": "Getting Your API Key",
        "body": "Sign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key"
      },
      {
        "title": "Connection Management",
        "body": "Manage your Google BigQuery OAuth connections at https://ctrl.maton.ai."
      },
      {
        "title": "List Connections",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=google-bigquery&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Create Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'google-bigquery'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Get Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"c8463a31-e5b4-4e52-9a32-e78dcd7ba7b1\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-14T09:02:02.780520Z\",\n    \"last_updated_time\": \"2026-02-14T09:02:19.977436Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"google-bigquery\",\n    \"metadata\": {}\n  }\n}\n\nOpen the returned url in a browser to complete OAuth authorization."
      },
      {
        "title": "Delete Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Specifying Connection",
        "body": "If you have multiple Google BigQuery connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/google-bigquery/bigquery/v2/projects')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', 'c8463a31-e5b4-4e52-9a32-e78dcd7ba7b1')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nIf omitted, the gateway uses the default (oldest) active connection."
      },
      {
        "title": "Projects",
        "body": "List Projects\n\nList all projects accessible to the authenticated user.\n\nGET /google-bigquery/bigquery/v2/projects\n\nResponse:\n\n{\n  \"kind\": \"bigquery#projectList\",\n  \"projects\": [\n    {\n      \"id\": \"my-project-123\",\n      \"numericId\": \"822245862053\",\n      \"projectReference\": {\n        \"projectId\": \"my-project-123\"\n      },\n      \"friendlyName\": \"My Project\"\n    }\n  ],\n  \"totalItems\": 1\n}"
      },
      {
        "title": "Datasets",
        "body": "List Datasets\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets\n\nQuery Parameters:\n\nmaxResults - Maximum number of results to return\npageToken - Token for pagination\nall - Include hidden datasets if true\n\nGet Dataset\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}\n\nCreate Dataset\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/datasets\nContent-Type: application/json\n\n{\n  \"datasetReference\": {\n    \"datasetId\": \"my_dataset\",\n    \"projectId\": \"{projectId}\"\n  },\n  \"description\": \"My dataset description\",\n  \"location\": \"US\"\n}\n\nResponse:\n\n{\n  \"kind\": \"bigquery#dataset\",\n  \"id\": \"my-project:my_dataset\",\n  \"datasetReference\": {\n    \"datasetId\": \"my_dataset\",\n    \"projectId\": \"my-project\"\n  },\n  \"location\": \"US\",\n  \"creationTime\": \"1771059780773\"\n}\n\nUpdate Dataset (PATCH)\n\nPATCH /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}\nContent-Type: application/json\n\n{\n  \"description\": \"Updated description\"\n}\n\nDelete Dataset\n\nDELETE /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}\n\nQuery Parameters:\n\ndeleteContents - If true, delete all tables in the dataset (default: false)"
      },
      {
        "title": "Tables",
        "body": "List Tables\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables\n\nQuery Parameters:\n\nmaxResults - Maximum number of results to return\npageToken - Token for pagination\n\nGet Table\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}\n\nCreate Table\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables\nContent-Type: application/json\n\n{\n  \"tableReference\": {\n    \"projectId\": \"{projectId}\",\n    \"datasetId\": \"{datasetId}\",\n    \"tableId\": \"my_table\"\n  },\n  \"schema\": {\n    \"fields\": [\n      {\"name\": \"id\", \"type\": \"INTEGER\", \"mode\": \"REQUIRED\"},\n      {\"name\": \"name\", \"type\": \"STRING\", \"mode\": \"NULLABLE\"},\n      {\"name\": \"created_at\", \"type\": \"TIMESTAMP\", \"mode\": \"NULLABLE\"}\n    ]\n  }\n}\n\nResponse:\n\n{\n  \"kind\": \"bigquery#table\",\n  \"id\": \"my-project:my_dataset.my_table\",\n  \"tableReference\": {\n    \"projectId\": \"my-project\",\n    \"datasetId\": \"my_dataset\",\n    \"tableId\": \"my_table\"\n  },\n  \"schema\": {\n    \"fields\": [\n      {\"name\": \"id\", \"type\": \"INTEGER\", \"mode\": \"REQUIRED\"},\n      {\"name\": \"name\", \"type\": \"STRING\", \"mode\": \"NULLABLE\"},\n      {\"name\": \"created_at\", \"type\": \"TIMESTAMP\", \"mode\": \"NULLABLE\"}\n    ]\n  },\n  \"numRows\": \"0\",\n  \"type\": \"TABLE\"\n}\n\nUpdate Table (PATCH)\n\nPATCH /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}\nContent-Type: application/json\n\n{\n  \"description\": \"Updated table description\"\n}\n\nDelete Table\n\nDELETE /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}"
      },
      {
        "title": "Table Data",
        "body": "List Table Data\n\nRetrieve rows from a table.\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data\n\nQuery Parameters:\n\nmaxResults - Maximum number of results to return\npageToken - Token for pagination\nstartIndex - Zero-based index of the starting row\n\nResponse:\n\n{\n  \"kind\": \"bigquery#tableDataList\",\n  \"totalRows\": \"100\",\n  \"rows\": [\n    {\n      \"f\": [\n        {\"v\": \"1\"},\n        {\"v\": \"Alice\"},\n        {\"v\": \"1.7710597807E9\"}\n      ]\n    }\n  ],\n  \"pageToken\": \"...\"\n}\n\nInsert Table Data (Streaming)\n\nInsert rows into a table using streaming insert. Note: Requires BigQuery paid tier.\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll\nContent-Type: application/json\n\n{\n  \"rows\": [\n    {\"json\": {\"id\": 1, \"name\": \"Alice\"}},\n    {\"json\": {\"id\": 2, \"name\": \"Bob\"}}\n  ]\n}"
      },
      {
        "title": "Jobs and Queries",
        "body": "Run Query (Synchronous)\n\nExecute a SQL query and return results directly.\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/queries\nContent-Type: application/json\n\n{\n  \"query\": \"SELECT * FROM `my_dataset.my_table` LIMIT 10\",\n  \"useLegacySql\": false,\n  \"maxResults\": 100\n}\n\nResponse:\n\n{\n  \"kind\": \"bigquery#queryResponse\",\n  \"schema\": {\n    \"fields\": [\n      {\"name\": \"id\", \"type\": \"INTEGER\"},\n      {\"name\": \"name\", \"type\": \"STRING\"}\n    ]\n  },\n  \"jobReference\": {\n    \"projectId\": \"my-project\",\n    \"jobId\": \"job_abc123\",\n    \"location\": \"US\"\n  },\n  \"totalRows\": \"2\",\n  \"rows\": [\n    {\"f\": [{\"v\": \"1\"}, {\"v\": \"Alice\"}]},\n    {\"f\": [{\"v\": \"2\"}, {\"v\": \"Bob\"}]}\n  ],\n  \"jobComplete\": true,\n  \"totalBytesProcessed\": \"1024\"\n}\n\nQuery Parameters:\n\nuseLegacySql - Use legacy SQL syntax (default: false for GoogleSQL)\nmaxResults - Maximum results per page\ntimeoutMs - Query timeout in milliseconds\n\nCreate Job (Asynchronous)\n\nSubmit a job for asynchronous execution.\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/jobs\nContent-Type: application/json\n\n{\n  \"configuration\": {\n    \"query\": {\n      \"query\": \"SELECT * FROM `my_dataset.my_table`\",\n      \"useLegacySql\": false,\n      \"destinationTable\": {\n        \"projectId\": \"{projectId}\",\n        \"datasetId\": \"{datasetId}\",\n        \"tableId\": \"results_table\"\n      },\n      \"writeDisposition\": \"WRITE_TRUNCATE\"\n    }\n  }\n}\n\nList Jobs\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/jobs\n\nQuery Parameters:\n\nmaxResults - Maximum number of results to return\npageToken - Token for pagination\nstateFilter - Filter by job state: done, pending, running\nprojection - full or minimal\n\nResponse:\n\n{\n  \"kind\": \"bigquery#jobList\",\n  \"jobs\": [\n    {\n      \"id\": \"my-project:US.job_abc123\",\n      \"jobReference\": {\n        \"projectId\": \"my-project\",\n        \"jobId\": \"job_abc123\",\n        \"location\": \"US\"\n      },\n      \"state\": \"DONE\",\n      \"statistics\": {\n        \"creationTime\": \"1771059781456\",\n        \"startTime\": \"1771059782203\",\n        \"endTime\": \"1771059782324\"\n      }\n    }\n  ]\n}\n\nGet Job\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/jobs/{jobId}\n\nQuery Parameters:\n\nlocation - Job location (e.g., \"US\", \"EU\")\n\nGet Query Results\n\nRetrieve results from a completed query job.\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/queries/{jobId}\n\nQuery Parameters:\n\nlocation - Job location\nmaxResults - Maximum results per page\npageToken - Token for pagination\nstartIndex - Zero-based starting row\n\nCancel Job\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/jobs/{jobId}/cancel\n\nQuery Parameters:\n\nlocation - Job location"
      },
      {
        "title": "Pagination",
        "body": "BigQuery uses token-based pagination. List responses include a pageToken when more results exist:\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets?maxResults=10&pageToken={token}\n\nResponse:\n\n{\n  \"datasets\": [...],\n  \"nextPageToken\": \"eyJvZmZzZXQiOjEwfQ==\"\n}\n\nUse the nextPageToken value as pageToken in subsequent requests."
      },
      {
        "title": "JavaScript",
        "body": "// Run a query\nconst response = await fetch(\n  'https://gateway.maton.ai/google-bigquery/bigquery/v2/projects/my-project/queries',\n  {\n    method: 'POST',\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`,\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n      query: 'SELECT * FROM `my_dataset.my_table` LIMIT 10',\n      useLegacySql: false\n    })\n  }\n);\nconst data = await response.json();\nconsole.log(data.rows);"
      },
      {
        "title": "Python",
        "body": "import os\nimport requests\n\n# Run a query\nresponse = requests.post(\n    'https://gateway.maton.ai/google-bigquery/bigquery/v2/projects/my-project/queries',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    json={\n        'query': 'SELECT * FROM `my_dataset.my_table` LIMIT 10',\n        'useLegacySql': False\n    }\n)\ndata = response.json()\nfor row in data.get('rows', []):\n    print([field['v'] for field in row['f']])"
      },
      {
        "title": "Schema Field Types",
        "body": "Common BigQuery data types for table schemas:\n\nTypeDescriptionSTRINGVariable-length character dataINTEGER64-bit signed integerFLOAT64-bit IEEE floating pointBOOLEANTrue or falseTIMESTAMPAbsolute point in timeDATECalendar dateTIMETime of dayDATETIMEDate and timeBYTESVariable-length binary dataNUMERICExact numeric value with 38 digits of precisionBIGNUMERICExact numeric value with 76+ digits of precisionGEOGRAPHYGeographic dataJSONJSON dataRECORDNested fields (also called STRUCT)\n\nField Modes:\n\nNULLABLE - Field can be null (default)\nREQUIRED - Field cannot be null\nREPEATED - Field is an array"
      },
      {
        "title": "Notes",
        "body": "Project IDs are typically in the format project-name or project-name-12345\nDataset IDs follow naming rules: letters, numbers, underscores (max 1024 characters)\nTable IDs follow same naming rules as datasets\nJob IDs are generated by BigQuery and include location prefix\nQuery results use f (fields) and v (value) structure\nStreaming inserts require BigQuery paid tier (not available in free tier)\nUse useLegacySql: false for GoogleSQL (standard SQL) syntax\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments"
      },
      {
        "title": "Error Handling",
        "body": "StatusMeaning400Missing Google BigQuery connection or invalid request401Invalid or missing Maton API key403Access denied (insufficient permissions or quota exceeded)404Resource not found (project, dataset, table, or job)409Resource already exists429Rate limited4xx/5xxPassthrough error from BigQuery API"
      },
      {
        "title": "Troubleshooting: API Key Issues",
        "body": "Check that the MATON_API_KEY environment variable is set:\n\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Troubleshooting: Invalid App Name",
        "body": "Ensure your URL path starts with google-bigquery. For example:\n\nCorrect: https://gateway.maton.ai/google-bigquery/bigquery/v2/projects\nIncorrect: https://gateway.maton.ai/bigquery/v2/projects"
      },
      {
        "title": "Resources",
        "body": "BigQuery API Overview\nDatasets\nTables\nJobs\nTabledata\nStandard SQL Reference\nMaton Community\nMaton Support"
      }
    ],
    "body": "Google BigQuery\n\nAccess the Google BigQuery API with managed OAuth authentication. Run SQL queries, manage datasets and tables, and analyze data at scale.\n\nQuick Start\n# Run a simple query\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'query': 'SELECT 1 as test_value', 'useLegacySql': False}).encode()\nreq = urllib.request.Request('https://gateway.maton.ai/google-bigquery/bigquery/v2/projects/{projectId}/queries', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nBase URL\nhttps://gateway.maton.ai/google-bigquery/bigquery/v2/{resource-path}\n\n\nReplace {resource-path} with the actual BigQuery API endpoint path. The gateway proxies requests to bigquery.googleapis.com and automatically injects your OAuth token.\n\nAuthentication\n\nAll requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n\nGetting Your API Key\nSign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key\nConnection Management\n\nManage your Google BigQuery OAuth connections at https://ctrl.maton.ai.\n\nList Connections\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=google-bigquery&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nCreate Connection\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'google-bigquery'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nGet Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"c8463a31-e5b4-4e52-9a32-e78dcd7ba7b1\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-14T09:02:02.780520Z\",\n    \"last_updated_time\": \"2026-02-14T09:02:19.977436Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"google-bigquery\",\n    \"metadata\": {}\n  }\n}\n\n\nOpen the returned url in a browser to complete OAuth authorization.\n\nDelete Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nSpecifying Connection\n\nIf you have multiple Google BigQuery connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/google-bigquery/bigquery/v2/projects')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', 'c8463a31-e5b4-4e52-9a32-e78dcd7ba7b1')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\nAPI Reference\nProjects\nList Projects\n\nList all projects accessible to the authenticated user.\n\nGET /google-bigquery/bigquery/v2/projects\n\n\nResponse:\n\n{\n  \"kind\": \"bigquery#projectList\",\n  \"projects\": [\n    {\n      \"id\": \"my-project-123\",\n      \"numericId\": \"822245862053\",\n      \"projectReference\": {\n        \"projectId\": \"my-project-123\"\n      },\n      \"friendlyName\": \"My Project\"\n    }\n  ],\n  \"totalItems\": 1\n}\n\nDatasets\nList Datasets\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets\n\n\nQuery Parameters:\n\nmaxResults - Maximum number of results to return\npageToken - Token for pagination\nall - Include hidden datasets if true\nGet Dataset\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}\n\nCreate Dataset\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/datasets\nContent-Type: application/json\n\n{\n  \"datasetReference\": {\n    \"datasetId\": \"my_dataset\",\n    \"projectId\": \"{projectId}\"\n  },\n  \"description\": \"My dataset description\",\n  \"location\": \"US\"\n}\n\n\nResponse:\n\n{\n  \"kind\": \"bigquery#dataset\",\n  \"id\": \"my-project:my_dataset\",\n  \"datasetReference\": {\n    \"datasetId\": \"my_dataset\",\n    \"projectId\": \"my-project\"\n  },\n  \"location\": \"US\",\n  \"creationTime\": \"1771059780773\"\n}\n\nUpdate Dataset (PATCH)\nPATCH /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}\nContent-Type: application/json\n\n{\n  \"description\": \"Updated description\"\n}\n\nDelete Dataset\nDELETE /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}\n\n\nQuery Parameters:\n\ndeleteContents - If true, delete all tables in the dataset (default: false)\nTables\nList Tables\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables\n\n\nQuery Parameters:\n\nmaxResults - Maximum number of results to return\npageToken - Token for pagination\nGet Table\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}\n\nCreate Table\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables\nContent-Type: application/json\n\n{\n  \"tableReference\": {\n    \"projectId\": \"{projectId}\",\n    \"datasetId\": \"{datasetId}\",\n    \"tableId\": \"my_table\"\n  },\n  \"schema\": {\n    \"fields\": [\n      {\"name\": \"id\", \"type\": \"INTEGER\", \"mode\": \"REQUIRED\"},\n      {\"name\": \"name\", \"type\": \"STRING\", \"mode\": \"NULLABLE\"},\n      {\"name\": \"created_at\", \"type\": \"TIMESTAMP\", \"mode\": \"NULLABLE\"}\n    ]\n  }\n}\n\n\nResponse:\n\n{\n  \"kind\": \"bigquery#table\",\n  \"id\": \"my-project:my_dataset.my_table\",\n  \"tableReference\": {\n    \"projectId\": \"my-project\",\n    \"datasetId\": \"my_dataset\",\n    \"tableId\": \"my_table\"\n  },\n  \"schema\": {\n    \"fields\": [\n      {\"name\": \"id\", \"type\": \"INTEGER\", \"mode\": \"REQUIRED\"},\n      {\"name\": \"name\", \"type\": \"STRING\", \"mode\": \"NULLABLE\"},\n      {\"name\": \"created_at\", \"type\": \"TIMESTAMP\", \"mode\": \"NULLABLE\"}\n    ]\n  },\n  \"numRows\": \"0\",\n  \"type\": \"TABLE\"\n}\n\nUpdate Table (PATCH)\nPATCH /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}\nContent-Type: application/json\n\n{\n  \"description\": \"Updated table description\"\n}\n\nDelete Table\nDELETE /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}\n\nTable Data\nList Table Data\n\nRetrieve rows from a table.\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data\n\n\nQuery Parameters:\n\nmaxResults - Maximum number of results to return\npageToken - Token for pagination\nstartIndex - Zero-based index of the starting row\n\nResponse:\n\n{\n  \"kind\": \"bigquery#tableDataList\",\n  \"totalRows\": \"100\",\n  \"rows\": [\n    {\n      \"f\": [\n        {\"v\": \"1\"},\n        {\"v\": \"Alice\"},\n        {\"v\": \"1.7710597807E9\"}\n      ]\n    }\n  ],\n  \"pageToken\": \"...\"\n}\n\nInsert Table Data (Streaming)\n\nInsert rows into a table using streaming insert. Note: Requires BigQuery paid tier.\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll\nContent-Type: application/json\n\n{\n  \"rows\": [\n    {\"json\": {\"id\": 1, \"name\": \"Alice\"}},\n    {\"json\": {\"id\": 2, \"name\": \"Bob\"}}\n  ]\n}\n\nJobs and Queries\nRun Query (Synchronous)\n\nExecute a SQL query and return results directly.\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/queries\nContent-Type: application/json\n\n{\n  \"query\": \"SELECT * FROM `my_dataset.my_table` LIMIT 10\",\n  \"useLegacySql\": false,\n  \"maxResults\": 100\n}\n\n\nResponse:\n\n{\n  \"kind\": \"bigquery#queryResponse\",\n  \"schema\": {\n    \"fields\": [\n      {\"name\": \"id\", \"type\": \"INTEGER\"},\n      {\"name\": \"name\", \"type\": \"STRING\"}\n    ]\n  },\n  \"jobReference\": {\n    \"projectId\": \"my-project\",\n    \"jobId\": \"job_abc123\",\n    \"location\": \"US\"\n  },\n  \"totalRows\": \"2\",\n  \"rows\": [\n    {\"f\": [{\"v\": \"1\"}, {\"v\": \"Alice\"}]},\n    {\"f\": [{\"v\": \"2\"}, {\"v\": \"Bob\"}]}\n  ],\n  \"jobComplete\": true,\n  \"totalBytesProcessed\": \"1024\"\n}\n\n\nQuery Parameters:\n\nuseLegacySql - Use legacy SQL syntax (default: false for GoogleSQL)\nmaxResults - Maximum results per page\ntimeoutMs - Query timeout in milliseconds\nCreate Job (Asynchronous)\n\nSubmit a job for asynchronous execution.\n\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/jobs\nContent-Type: application/json\n\n{\n  \"configuration\": {\n    \"query\": {\n      \"query\": \"SELECT * FROM `my_dataset.my_table`\",\n      \"useLegacySql\": false,\n      \"destinationTable\": {\n        \"projectId\": \"{projectId}\",\n        \"datasetId\": \"{datasetId}\",\n        \"tableId\": \"results_table\"\n      },\n      \"writeDisposition\": \"WRITE_TRUNCATE\"\n    }\n  }\n}\n\nList Jobs\nGET /google-bigquery/bigquery/v2/projects/{projectId}/jobs\n\n\nQuery Parameters:\n\nmaxResults - Maximum number of results to return\npageToken - Token for pagination\nstateFilter - Filter by job state: done, pending, running\nprojection - full or minimal\n\nResponse:\n\n{\n  \"kind\": \"bigquery#jobList\",\n  \"jobs\": [\n    {\n      \"id\": \"my-project:US.job_abc123\",\n      \"jobReference\": {\n        \"projectId\": \"my-project\",\n        \"jobId\": \"job_abc123\",\n        \"location\": \"US\"\n      },\n      \"state\": \"DONE\",\n      \"statistics\": {\n        \"creationTime\": \"1771059781456\",\n        \"startTime\": \"1771059782203\",\n        \"endTime\": \"1771059782324\"\n      }\n    }\n  ]\n}\n\nGet Job\nGET /google-bigquery/bigquery/v2/projects/{projectId}/jobs/{jobId}\n\n\nQuery Parameters:\n\nlocation - Job location (e.g., \"US\", \"EU\")\nGet Query Results\n\nRetrieve results from a completed query job.\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/queries/{jobId}\n\n\nQuery Parameters:\n\nlocation - Job location\nmaxResults - Maximum results per page\npageToken - Token for pagination\nstartIndex - Zero-based starting row\nCancel Job\nPOST /google-bigquery/bigquery/v2/projects/{projectId}/jobs/{jobId}/cancel\n\n\nQuery Parameters:\n\nlocation - Job location\nPagination\n\nBigQuery uses token-based pagination. List responses include a pageToken when more results exist:\n\nGET /google-bigquery/bigquery/v2/projects/{projectId}/datasets?maxResults=10&pageToken={token}\n\n\nResponse:\n\n{\n  \"datasets\": [...],\n  \"nextPageToken\": \"eyJvZmZzZXQiOjEwfQ==\"\n}\n\n\nUse the nextPageToken value as pageToken in subsequent requests.\n\nCode Examples\nJavaScript\n// Run a query\nconst response = await fetch(\n  'https://gateway.maton.ai/google-bigquery/bigquery/v2/projects/my-project/queries',\n  {\n    method: 'POST',\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`,\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n      query: 'SELECT * FROM `my_dataset.my_table` LIMIT 10',\n      useLegacySql: false\n    })\n  }\n);\nconst data = await response.json();\nconsole.log(data.rows);\n\nPython\nimport os\nimport requests\n\n# Run a query\nresponse = requests.post(\n    'https://gateway.maton.ai/google-bigquery/bigquery/v2/projects/my-project/queries',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    json={\n        'query': 'SELECT * FROM `my_dataset.my_table` LIMIT 10',\n        'useLegacySql': False\n    }\n)\ndata = response.json()\nfor row in data.get('rows', []):\n    print([field['v'] for field in row['f']])\n\nSchema Field Types\n\nCommon BigQuery data types for table schemas:\n\nType\tDescription\nSTRING\tVariable-length character data\nINTEGER\t64-bit signed integer\nFLOAT\t64-bit IEEE floating point\nBOOLEAN\tTrue or false\nTIMESTAMP\tAbsolute point in time\nDATE\tCalendar date\nTIME\tTime of day\nDATETIME\tDate and time\nBYTES\tVariable-length binary data\nNUMERIC\tExact numeric value with 38 digits of precision\nBIGNUMERIC\tExact numeric value with 76+ digits of precision\nGEOGRAPHY\tGeographic data\nJSON\tJSON data\nRECORD\tNested fields (also called STRUCT)\n\nField Modes:\n\nNULLABLE - Field can be null (default)\nREQUIRED - Field cannot be null\nREPEATED - Field is an array\nNotes\nProject IDs are typically in the format project-name or project-name-12345\nDataset IDs follow naming rules: letters, numbers, underscores (max 1024 characters)\nTable IDs follow same naming rules as datasets\nJob IDs are generated by BigQuery and include location prefix\nQuery results use f (fields) and v (value) structure\nStreaming inserts require BigQuery paid tier (not available in free tier)\nUse useLegacySql: false for GoogleSQL (standard SQL) syntax\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments\nError Handling\nStatus\tMeaning\n400\tMissing Google BigQuery connection or invalid request\n401\tInvalid or missing Maton API key\n403\tAccess denied (insufficient permissions or quota exceeded)\n404\tResource not found (project, dataset, table, or job)\n409\tResource already exists\n429\tRate limited\n4xx/5xx\tPassthrough error from BigQuery API\nTroubleshooting: API Key Issues\nCheck that the MATON_API_KEY environment variable is set:\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nTroubleshooting: Invalid App Name\nEnsure your URL path starts with google-bigquery. For example:\nCorrect: https://gateway.maton.ai/google-bigquery/bigquery/v2/projects\nIncorrect: https://gateway.maton.ai/bigquery/v2/projects\nResources\nBigQuery API Overview\nDatasets\nTables\nJobs\nTabledata\nStandard SQL Reference\nMaton Community\nMaton Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/byungkyu/google-bigquery",
    "publisherUrl": "https://clawhub.ai/byungkyu/google-bigquery",
    "owner": "byungkyu",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/google-bigquery",
    "downloadUrl": "https://openagent3.xyz/downloads/google-bigquery",
    "agentUrl": "https://openagent3.xyz/skills/google-bigquery/agent",
    "manifestUrl": "https://openagent3.xyz/skills/google-bigquery/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/google-bigquery/agent.md"
  }
}