Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Esta página explica como configurar e acessar relatórios predefinidos no BigQuery.
No Google Cloud console, você pode escrever sua consulta personalizada com base no nome da tabela
ou no relatório pré-criado e salvá-la como uma consulta ou uma visualização.
Escrever consultas personalizadas no BigQuery como uma consulta
Para escrever consultas personalizadas no BigQuery como uma consulta, faça o seguinte:
No Google Cloud console, acesse a página BigQuery Studio:
No painel Explorer, expanda o projeto e selecione um conjunto de dados.
Clique no nome do conjunto de dados para expandi-lo.
As tabelas e visualizações no conjunto de dados aparecem.
Clique no nome da tabela ou em um relatório predefinido.
A guia Detalhes mostra a descrição da tabela, e a guia Esquema mostra a definição do esquema da tabela.
Clique em Consulta e selecione Em uma nova guia ou Na guia dividida.
Uma nova guia é aberta com uma consulta de exemplo.
Escreva uma consulta com base nos nomes dos campos que são preenchidos na guia Esquema.
Clique em Executar. Isso mostra a visualização dos resultados da consulta.
Clique em Salvar visualização.
Na caixa de diálogo Salvar visualização, faça o seguinte:
Na lista Project, clique em Browse e selecione um projeto.
Na lista Conjunto de dados, selecione um conjunto de dados para armazenar a visualização. O conjunto de dados que contém a visualização e o conjunto que inclui as tabelas mencionadas por ela precisam estar no mesmo local.
Em Nome da tabela, insira um nome para a visualização.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[[["\u003cp\u003eBigQuery allows you to write custom queries based on table names or prebuilt reports within the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eYou can save custom queries in BigQuery as a query, enabling you to reuse them later by naming the query in the save query dialog.\u003c/p\u003e\n"],["\u003cp\u003eCustom queries can also be saved as a view, allowing for the selection of a project, dataset, and table name within the save view dialog.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating queries or views, users must select a dataset where the view is stored, and the dataset must be in the same location as the tables referenced.\u003c/p\u003e\n"]]],[],null,["# Custom queries in BigQuery\n\nThis page explains how to set up and view prebuilt reports in BigQuery.\n\nIn Google Cloud console, you can write your custom query based on the table name\nor prebuilt report and save it as a query or as a view.\n\nWrite custom queries in BigQuery as a query\n-------------------------------------------\n\nTo write custom queries in BigQuery as a query, do the following:\n\n1. In the Google Cloud console, go to the **BigQuery Studio** page:\n\n [Go to BigQuery Studio page](https://console.cloud.google.com/bigquery)\n2. In the **Explorer** panel, expand your project and select a dataset.\n3. Click the dataset name to expand it.\n\n The tables and views in the dataset appear.\n4. Click the table name or a prebuilt report.\n\n The **Details** tab displays the table's description and the **Schema** tab displays the table's schema definition.\n5. Click **Query** and select either **In new tab** or **In split tab**.\n\n A new tab opens with a sample query.\n6. Write a query based on the field names that are populated in the **Schema** tab.\n\n7. Click **Run**. This displays the preview of the query results.\n\n8. Click **Save query**.\n\n9. In the **Save query** dialog, type a name for the saved query.\n\nYou can download and save queries to the selected location. For more information, see [Downloading and saving query results from the Google Cloud console](/bigquery/docs/writing-results#downloading-saving-results-console).\n\nWrite custom queries in BigQuery as a view\n------------------------------------------\n\nTo write custom queries in BigQuery as a view, do the following:\n\n1. In the Google Cloud console, go to the **BigQuery Studio** page:\n\n [Go to BigQuery Studio page](https://console.cloud.google.com/bigquery)\n2. In the **Explorer** panel, expand your project and select a dataset.\n3. Click the dataset name to expand it.\n\n The tables and views in the dataset appear.\n4. Click the table name or a prebuilt report.\n\n The **Details** tab displays the table's description and the **Schema** tab displays the table's schema definition.\n5. Click **Query** and select either **In new tab** or **In split tab**.\n\n A new tab opens with a sample query.\n6. Write a query based on the field names that are populated in the **Schema** tab.\n\n7. Click **Run**. This displays the preview of the query results.\n\n8. Click **Save view**.\n\n9. In the **Save view** dialog, do the following:\n\n 1. In the **Project** list, click **Browse** and select a project.\n 2. In the **Dataset** list, select a dataset to store the view. The dataset that contains your view and the dataset that contains the tables referenced by the view must be in the same [location](/bigquery/docs/dataset-locations).\n 3. In **Table name**, enter a name for the view.\n 4. Click **Save**.\n\nYou can download and save queries to the selected location. For more information, see [Downloading and saving query results from the Google Cloud console](/bigquery/docs/writing-results#downloading-saving-results-console).\n\nWhat's next\n-----------\n\n- Learn how to [View prebuilt reports in Google connected sheets](/backup-disaster-recovery/docs/monitor-reports/view-reports-sheets)\n- Learn how to [View prebuilt reports in Looker](/backup-disaster-recovery/docs/monitor-reports/view-reports-lookerstudio)"]]