> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/docs/pt/contexto/knowledge-bases/add-data/import-from-sql-database/data-sources/bigquery.md).

# BigQuery

Conecte a uma base de dados BigQuery no AirOps

{% hint style="info" %}
**Lembre-se de adicionar o nosso endereço IP à lista de permissões `52.71.87.39`**

Se a sua base de dados estiver protegida por uma firewall, lembre-se de permitir o acesso de entrada ao endereço IP da AirOps através da porta da sua base de dados.
{% endhint %}

## Configurar a conta de serviço do Google Cloud Platform e conceder acesso (para novos utilizadores)

Para adicionar um armazém de dados do Google BigQuery como fonte de dados no AirOps, utilize uma conta de serviço do Google Cloud Platform com **acesso de leitura** aos conjuntos de dados e tabelas pretendidos:

### 1. Criar uma conta de serviço do Google Cloud Platform

1. Aceda à [Consola do Google Cloud Platform](https://console.cloud.google.com/).
2. Clique no menu pendente do projeto e selecione o projeto que contém o seu conjunto de dados do BigQuery.
3. Aceda à página **IAM e administração** e, em seguida, clique em **Contas de serviço**.
4. Clique em **+ CRIAR CONTA DE SERVIÇO** na parte superior da página.
5. Introduza um nome para a conta de serviço e clique em **Criar**.
6. Na página **Conceder acesso ao projeto a esta conta de serviço** selecione as funções **Visualizador de dados do BigQuery** e **Utilizador de tarefas do BigQuery** .
7. Clique em **Continuar**, e, em seguida, clique em **Concluído**.

### 2. Gerar uma chave JSON para a conta de serviço

1. Na página **Contas de serviço** localize a conta de serviço que acabou de criar.
2. Clique no menu **Ações** (três pontos verticais) e selecione **Criar chave**.
3. Selecione **JSON** como tipo de chave e clique em **Criar**.
4. Guarde no computador o ficheiro de chave JSON gerado.

<figure><img src="https://files.readme.io/b48622d-image.png" alt="" width="375"><figcaption></figcaption></figure>

### 3. Introduzir o conteúdo do ficheiro de chave JSON no AirOps

1. Abra o ficheiro de chave JSON num editor de texto.
2. Copie todo o conteúdo do ficheiro de chave JSON.
3. No AirOps, cole o conteúdo do ficheiro de chave JSON no campo **Chave JSON** .

<figure><img src="https://31915162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-c791fb7eb606e0835aa7e64e4f699976449f239d%2Fbigquery-01-connection-form.png?alt=media" alt="BigQuery connection form with a project ID, an uploaded service account key JSON file, a region, and Connect"><figcaption><p>Carregue o ficheiro JSON da chave da conta de serviço no AirOps.</p></figcaption></figure>

Agora, o seu armazém de dados do Google BigQuery deverá estar ligado e pronto a utilizar no AirOps.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.airops.com/docs/pt/contexto/knowledge-bases/add-data/import-from-sql-database/data-sources/bigquery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
