BigQuery is Google Cloud's fully managed, petabyte-scale, and
cost-effective analytics data warehouse that lets you run analytics over
vast amounts of data in near real time. With BigQuery, there's
no infrastructure to set up or manage, letting you focus on finding meaningful
insights using GoogleSQL and taking advantage of flexible pricing models
across on-demand and flat-rate options.
Learn more
Start your proof of concept with $300 in free credit
-
Get access to Gemini 2.0 Flash Thinking
-
Free monthly usage of popular products, including AI APIs and BigQuery
-
No automatic charges, no commitment
Keep exploring with 20+ always-free products
Access 20+ free products for common use cases, including AI APIs, VMs, data warehouses,
and more.
Training
Training and tutorials
Data Warehouse with BigQuery Jump Start Solution
Deploy and use a sample data warehouse with BigQuery.
Training
Training and tutorials
BigQuery for Data Warehousing
Learn best practices for extracting, transforming, and loading your data into Google Cloud with BigQuery.
Training
Training and tutorials
Preprocessing BigQuery Data with PySpark on Dataproc
Learn to create a data processing pipeline using Apache Spark with Dataproc on Google Cloud. It is a common use case in data science and data engineering to read data from one storage location, perform transformations on it and write it into another storage location.
Training
Training and tutorials
BigQuery For Data Analysis
Learn how to query, ingest, optimize, visualize, and even build machine learning models in SQL inside of BigQuery.
Training
Training and tutorials
BigQuery for Marketing Analysts
Get repeatable, scalable, and valuable insights into your data by learning how to query it using BigQuery.
Training
Training and tutorials
BigQuery for Machine Learning
Experiment with different model types in BigQuery Machine Learning, and learn what makes a good model.
Use case
Use cases
Migrating data warehouses to BigQuery
Learn patterns and recommendations for transitioning your on-premises data warehouse to BigQuery.
Migration
Patterns
BigQuery
Use case
Use cases
Visualizing BigQuery data in a Jupyter notebook
Use the BigQuery Python client library and Pandas in a Jupyter notebook to visualize data in a BigQuery sample table.
Code sample
Code Samples
Client: Create credentials with scopes
Create credentials with Drive and BigQuery API scopes.
Code sample
Code Samples
Client: Create credentials with application default credentials
Create a BigQuery client using application default credentials.
Code sample
Code Samples
Client: Create with service account key
Create a BigQuery client using a service account key file.
Code sample
Code Samples
Python samples
Working with BigQuery with the Google Cloud Python client library
Code sample
Code Samples
Node.js samples
Samples for the Node.js client library sfor BigQuery
Code sample
Code Samples
C# simple sample
A simple C# program and code snippets for interacting with BigQuery
Code sample
Code Samples
BigQuery and Cloud Monitoring on App Engine with Java 8
This API Showcase demonstrates how to run an App Engine standard environment application with dependencies on both BigQuery and Cloud Monitoring.
Code sample
Code Samples
All samples
Browse all samples for BigQuery
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eBigQuery is a fully managed, petabyte-scale data warehouse service by Google Cloud, designed for running real-time analytics on massive datasets.\u003c/p\u003e\n"],["\u003cp\u003eIt offers flexible pricing models, including on-demand and flat-rate options, allowing users to optimize costs based on their needs.\u003c/p\u003e\n"],["\u003cp\u003eBigQuery provides comprehensive documentation and guides for various tasks, including quickstarts, table management, data loading, and machine learning integration.\u003c/p\u003e\n"],["\u003cp\u003eResources are available for users, covering topics like pricing, release notes, locations, cost control, troubleshooting, and support.\u003c/p\u003e\n"],["\u003cp\u003eTraining, use cases, and code samples are provided to assist users with data warehousing, data analysis, machine learning, and migrating data warehouses to BigQuery, along with showcasing code for various client-side integrations.\u003c/p\u003e\n"]]],[],null,["# BigQuery documentation\n======================\n\n[Read product documentation](/bigquery/docs/introduction)\nBigQuery is Google Cloud's fully managed, petabyte-scale, and\ncost-effective analytics data warehouse that lets you run analytics over\nvast amounts of data in near real time. With BigQuery, there's\nno infrastructure to set up or manage, letting you focus on finding meaningful\ninsights using GoogleSQL and taking advantage of flexible pricing models\nacross on-demand and flat-rate options.\n[Learn more](/bigquery/docs/introduction)\n[Get started for free](https://console.cloud.google.com/freetrial) \n\n#### Start your proof of concept with $300 in free credit\n\n- Get access to Gemini 2.0 Flash Thinking\n- Free monthly usage of popular products, including AI APIs and BigQuery\n- No automatic charges, no commitment \n[View free product offers](/free/docs/free-cloud-features#free-tier) \n\n#### Keep exploring with 20+ always-free products\n\n\nAccess 20+ free products for common use cases, including AI APIs, VMs, data warehouses,\nand more.\n\nDocumentation resources\n-----------------------\n\nFind quickstarts and guides, review key references, and get help with common issues. \nformat_list_numbered\n\n### Guides\n\n-\n\n\n Quickstarts:\n [Console](/bigquery/docs/quickstarts/query-public-dataset-console),\n\n [Command line](/bigquery/docs/quickstarts/load-data-bq),\n or\n [Client libraries](/bigquery/docs/quickstarts/quickstart-client-libraries)\n\n\n-\n\n [Creating and using tables](/bigquery/docs/tables)\n\n-\n\n [Introduction to partitioned tables](/bigquery/docs/partitioned-tables)\n\n-\n\n [Introduction to BigQuery ML](/bigquery/docs/bqml-introduction)\n\n-\n\n [Predefined roles and permissions](/bigquery/docs/access-control)\n\n-\n\n [Introduction to loading data](/bigquery/docs/loading-data)\n\n-\n\n [Loading CSV data from Cloud Storage](/bigquery/docs/loading-data-cloud-storage-csv)\n\n-\n\n [Exporting table data](/bigquery/docs/exporting-data)\n\n-\n\n [Create machine learning models in BigQuery ML](/bigquery/docs/create-machine-learning-model)\n\n-\n\n [Querying external data sources](/bigquery/external-data-sources)\n\n-\n\n [Introduction to vector search](/bigquery/docs/vector-search-intro)\n\nfind_in_page\n\n### Reference\n\n-\n\n [Functions in GoogleSQL](/bigquery/docs/reference/standard-sql/functions-all)\n\n-\n\n [Operators in GoogleSQL](/bigquery/docs/reference/standard-sql/operators)\n\n-\n\n [Conditional expressions in GoogleSQL](/bigquery/docs/reference/standard-sql/conditional_expressions)\n\n-\n\n [Date functions in GoogleSQL](/bigquery/docs/reference/standard-sql/date_functions)\n\n-\n\n [Query syntax in GoogleSQL](/bigquery/docs/reference/standard-sql/query-syntax)\n\n-\n\n [String functions in GoogleSQL](/bigquery/docs/reference/standard-sql/string_functions)\n\n-\n\n [Using the bq command-line tool](/bigquery/docs/bq-command-line-tool)\n\n-\n\n [End-to-end journey for machine learning models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-e2e-journey)\n\n-\n\n [BigQuery API Client Libraries](/bigquery/docs/reference/libraries)\n\n-\n\n [Creating and training models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create)\n\n-\n\n [Public datasets](/bigquery/public-data)\n\n-\n\n [Feature preprocessing](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-preprocess-overview)\n\ninfo\n\n### Resources\n\n-\n\n [Pricing](/bigquery/pricing)\n\n-\n\n [Release notes](/bigquery/docs/release-notes)\n\n-\n\n [Locations](/bigquery/docs/locations)\n\n-\n\n [Getting support](/bigquery/docs/getting-support)\n\n-\n\n [Quotas and limits](/bigquery/quotas)\n\n-\n\n [Controlling costs](/bigquery/docs/controlling-costs)\n\n-\n\n [Creating custom cost controls](/bigquery/docs/custom-quotas)\n\n-\n\n [Troubleshooting BigQuery quota errors](/bigquery/docs/troubleshoot-quotas)\n\n-\n\n [Billing questions](/bigquery/docs/billing-questions)\n\nRelated resources\n-----------------\n\nTraining and tutorials \nUse cases \nCode samples \nExplore self-paced training, use cases, reference architectures, and code samples with examples of how to use and connect Google Cloud services. Training \nTraining and tutorials\n\n### Data Warehouse with BigQuery Jump Start Solution\n\n\nDeploy and use a sample data warehouse with BigQuery.\n\n\n[Learn more](https://cloud.google.com/architecture/big-data-analytics/data-warehouse) \nTraining \nTraining and tutorials\n\n### BigQuery for Data Warehousing\n\n\nLearn best practices for extracting, transforming, and loading your data into Google Cloud with BigQuery.\n\n\n[Learn more](https://www.cloudskillsboost.google/course_templates/679) \nTraining \nTraining and tutorials\n\n### Preprocessing BigQuery Data with PySpark on Dataproc\n\n\nLearn to create a data processing pipeline using Apache Spark with Dataproc on Google Cloud. It is a common use case in data science and data engineering to read data from one storage location, perform transformations on it and write it into another storage location.\n\n\n[Learn more](https://codelabs.developers.google.com/codelabs/pyspark-bigquery/) \nTraining \nTraining and tutorials\n\n### BigQuery For Data Analysis\n\n\nLearn how to query, ingest, optimize, visualize, and even build machine learning models in SQL inside of BigQuery.\n\n\n[Learn more](https://www.cloudskillsboost.google/course_templates/865) \nTraining \nTraining and tutorials\n\n### BigQuery for Marketing Analysts\n\n\nGet repeatable, scalable, and valuable insights into your data by learning how to query it using BigQuery.\n\n\n[Learn more](https://www.cloudskillsboost.google/course_templates/678) \nTraining \nTraining and tutorials\n\n### BigQuery for Machine Learning\n\n\nExperiment with different model types in BigQuery Machine Learning, and learn what makes a good model.\n\n\n[Learn more](https://www.cloudskillsboost.google/course_templates/680) \nUse case \nUse cases\n\n### Migrating data warehouses to BigQuery\n\n\nLearn patterns and recommendations for transitioning your on-premises data warehouse to BigQuery.\n\nMigration Patterns BigQuery\n\n\u003cbr /\u003e\n\n[Learn more](/solutions/migration/dw2bq/dw-bq-migration-overview) \nUse case \nUse cases\n\n### Visualizing BigQuery data in a Jupyter notebook\n\n\nUse the BigQuery Python client library and Pandas in a Jupyter notebook to visualize data in a BigQuery sample table.\n\n\n[Learn more](/bigquery/docs/visualize-jupyter) \nCode sample \nCode Samples\n\n### Client: Create credentials with scopes\n\n\nCreate credentials with Drive and BigQuery API scopes.\n\n\n[Get started](/bigquery/docs/samples/bigquery-auth-drive-scope) \nCode sample \nCode Samples\n\n### Client: Create credentials with application default credentials\n\n\nCreate a BigQuery client using application default credentials.\n\n\n[Get started](/bigquery/docs/samples/bigquery-client-default-credentials) \nCode sample \nCode Samples\n\n### Client: Create with service account key\n\n\nCreate a BigQuery client using a service account key file.\n\n\n[Get started](/bigquery/docs/samples/bigquery-client-json-credentials) \nCode sample \nCode Samples\n\n### Python samples\n\n\nWorking with BigQuery with the Google Cloud Python client library\n\n\n[Open GitHub\narrow_forward](https://github.com/googleapis/python-bigquery/tree/main/samples) \nCode sample \nCode Samples\n\n### Node.js samples\n\n\nSamples for the Node.js client library sfor BigQuery\n\n\n[Open GitHub\narrow_forward](https://github.com/googleapis/nodejs-bigquery/tree/main/samples) \nCode sample \nCode Samples\n\n### C# simple sample\n\n\nA simple C# program and code snippets for interacting with BigQuery\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/dotnet-docs-samples/tree/master/bigquery/api) \nCode sample \nCode Samples\n\n### BigQuery and Cloud Monitoring on App Engine with Java 8\n\n\nThis API Showcase demonstrates how to run an App Engine standard environment application with dependencies on both BigQuery and Cloud Monitoring.\n\n\n[Open GitHub\narrow_forward](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/appengine-java8/bigquery) \nCode sample \nCode Samples\n\n### All samples\n\n\nBrowse all samples for BigQuery\n\n\n[Get started](/bigquery/docs/samples)\n\nRelated videos\n--------------\n\n### Try BigQuery for yourself\n\nCreate an account to evaluate how our products perform in real-world scenarios. \nNew customers also get $300 in free credits to run, test, and deploy workloads. \n[Try BigQuery free](https://console.cloud.google.com/freetrial)"]]