Try BigQuery using the sandbox

The BigQuery sandbox lets you explore limited BigQuery capabilitiesat no cost to confirm whether BigQuery fits your needs. TheBigQuery sandbox lets you experience BigQuery withoutproviding a credit card or creating a billing account for your project. If youalready created a billing account, you can still use BigQuery atno cost in the free usage tier.

The BigQuery sandbox lets you learn BigQuery with alimited set of BigQuery features at no charge. You can evaluateBigQuery by using the BigQuery sandbox to view and query apublic dataset.

Google Cloud offers public datasets that are stored in BigQueryand made available to the general public through theGoogle Cloud Public Dataset Program. For more information aboutworking with public datasets, seeBigQuery public datasets.


To follow step-by-step guidance for this task directly in the Google Cloud console, clickGuide me:

Guide me


Before you begin

Enable the BigQuery sandbox

  1. In the Google Cloud console, go to theBigQuery page.

    Go to BigQuery

    You can also open BigQuery in the Google Cloud consoleby entering the following URL in your browser:

    https://console.cloud.google.com/bigquery

    The Google Cloud console is the graphical interface that you use to createand manage BigQuery resources and to run SQL queries.

  2. Authenticate with your Google Account, or create a new one.

  3. On the welcome page, do the following:

    1. ForCountry, select your country.

    2. ForTerms of Service, select the checkbox if you agree to the termsof service.

    3. Optional: If you are asked about email updates, select the checkbox ifyou want to receive email updates.

    4. ClickAgree and continue.

    Items on the BigQuery sandbox welcome page.

  4. ClickCreate project.

  5. On theNew Project page, do the following:

    1. ForProject name, enter a name for your project.

    2. ForOrganization, select an organization or selectNo organization if you are not part of one. Managed accounts, suchas those associated with academic institutions, must select anorganization.

    3. If you are asked to select aLocation, clickBrowse and select alocation for your project.

    4. ClickCreate. You are redirected back to theBigQuery page inthe Google Cloud console.

    BigQuery sandbox project creation page.

You have successfully enabled the BigQuery sandbox. ABigQuery sandbox notice is now displayed on theBigQuery page:

The confirmation notice provides the option to upgrade to the full BigQuery experience.

Limitations

The BigQuery sandbox is subject to the following limits:

View a public dataset

BigQuery public datasets are available by default inBigQuery Studio in a project namedbigquery-public-data. In thistutorial you query the NYC Citi Bike Trips dataset. Citi Bike is a large bikeshare program, with 10,000 bikes and 600 stations across Manhattan, Brooklyn,Queens, and Jersey City. This dataset includes Citi Bike trips since Citi Bikelaunched in September 2013.

  1. In the Google Cloud console, go to theBigQuery page.

    Go to BigQuery

  2. In the left pane, clickExplorer:

    Highlighted button for the Explorer pane.

    If you don't see the left pane, clickExpand left pane to open the pane.

  3. In theExplorer pane, clickAdd data.

  4. In theAdd data dialog, clickPublic dataset icon on the Filter by pagePublic datasets.

  5. On theMarketplace page, in theSearch Marketplace field, typeNYCCiti Bike Trips to narrow your search.

  6. In the search results, clickNYC Citi Bike Trips.

  7. On theProduct details page, clickView dataset. You can viewinformation about the dataset on theDetails tab.

Query a public dataset

In the following steps, you query thecitibike_trips table to determine the100 most popular Citi Bike stations in the NYC Citi Bike Trips public dataset.The query retrieves the station's name and location, and the number oftrips that started at that station.

The query uses theST_GEOGPOINT functionto create a point from each station's longitude and latitude parameters andreturns that point in aGEOGRAPHY column. TheGEOGRAPHY column is used togenerate a heatmap in the integrated geography data viewer.

  1. In the Google Cloud console, open theBigQuery page.

    Go to BigQuery

  2. ClickSQL query.

  3. In thequery editor, enter the following query:

    SELECTstart_station_name,start_station_latitude,start_station_longitude,ST_GEOGPOINT(start_station_longitude,start_station_latitude)ASgeo_location,COUNT(*)ASnum_tripsFROM`bigquery-public-data.new_york.citibike_trips`GROUPBY1,2,3ORDERBYnum_tripsDESCLIMIT100;

    If the query is valid, then a check mark appears along with the amount ofdata that the query processes. If the query is invalid, then anexclamation point appears along with an error message.

    Query validator

  4. ClickRun.The most popular stations are listed in theQuery resultssection.

    Query results in the Google Cloud console

  5. Optional: To display the duration of the job and the amount of data that thequery job processed, click theJob information tab in theQueryresults section.

  6. Switch to theVisualizationtab. This tab generates a map to quickly visualize your results.

  7. In theVisualization configuration panel:

    1. Verify thatVisualization type is set toMap.
    2. Verify thatGeography column is set togeo_location.
    3. ForData column, choosenum_trips.
    4. Use theZoom in option toreveal the map of Manhattan.

    A heatmap generated on the Visualization tab

Upgrade from the BigQuery sandbox

The BigQuery sandbox lets you explorelimited BigQuery capabilitiesat no cost. When you are ready to increase your storage and querycapabilities, upgrade from the BigQuery sandbox.

To upgrade, do the following:

  1. Enable billingfor your project.

  2. ExploreBigQuery editionsand determine the pricing model that is right for you.

Once you have upgraded from the BigQuery sandbox, you shouldupdate the default expiration times for your BigQuery resourcessuch as tables, views, and partitions.

Clean up

To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.

Delete the project

If you used theBigQuery sandbox to querythe public dataset, then billing is not enabled for your project, and you don'tneed to delete the project.

The easiest way to eliminate billing is to delete the project that you created for the tutorial.

To delete the project:

    Caution: Deleting a project has the following effects:
    • Everything in the project is deleted. If you used an existing project for the tasks in this document, when you delete it, you also delete any other work you've done in the project.
    • Custom project IDs are lost. When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as anappspot.com URL, delete selected resources inside the project instead of deleting the whole project.

    If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects can help you avoid exceeding project quota limits.

  1. In the Google Cloud console, go to theManage resources page.

    Go to Manage resources

  2. In the project list, select the project that you want to delete, and then clickDelete.
  3. In the dialog, type the project ID, and then clickShut down to delete the project.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.