Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.FeatureCollection.loadBigQueryTable
Stay organized with collections
Save and categorize content based on your preferences.
Reads data from a BigQuery table and presents the results as a FeatureCollection.
Usage | Returns | ee.FeatureCollection.loadBigQueryTable(table, geometryColumn) | FeatureCollection |
Argument | Type | Details | table | String | Path to BigQuery table in a `project.dataset.table` format. |
geometryColumn | String, default: null | The name of the column to use as the main feature geometry. If not specified, the first column with GEOGRAPHY type will be used. |
Examples
Code Editor (JavaScript)
// Load stations from the New York Subway System.
var features = ee.FeatureCollection.loadBigQueryTable({
table: 'bigquery-public-data.new_york_subway.stations',
geometryColumn: 'station_geom',
});
// Display all relevant features on the map.
Map.setCenter(-73.90, 40.73, 11);
Map.addLayer(features,
{'color': 'black'},
'Stations from New York Subway System');
// Print all stations in the "Astoria" line.
var line = features.filter(ee.Filter.eq('line', 'Astoria'));
print(line);
Map.addLayer(line,
{'color': 'yellow'},
'Astoria line');
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
Colab (Python)
# Load stations from the New York Subway System.
features = ee.FeatureCollection.loadBigQueryTable(
table="bigquery-public-data.new_york_subway.stations",
geometryColumn="station_geom")
# Display all relevant features on the map.
m = geemap.Map()
m.set_center(-73.90, 40.73, 11)
m.add_layer(
features, {'color': 'black'}, 'Stations from New York Subway System')
# Print all stations in the "Astoria" line.
line = features.filter(ee.Filter.eq('line', 'Astoria'))
display(line)
m.add_layer(line, {'color': 'yellow'}, 'Astoria line')
m
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-06-23 UTC.
[null,null,["Last updated 2025-06-23 UTC."],[],[],null,["# ee.FeatureCollection.loadBigQueryTable\n\nReads data from a BigQuery table and presents the results as a FeatureCollection.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------------------------|-------------------|\n| `ee.FeatureCollection.loadBigQueryTable(table, `*geometryColumn*`)` | FeatureCollection |\n\n| Argument | Type | Details |\n|------------------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| `table` | String | Path to BigQuery table in a \\`project.dataset.table\\` format. |\n| `geometryColumn` | String, default: null | The name of the column to use as the main feature geometry. If not specified, the first column with GEOGRAPHY type will be used. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Load stations from the New York Subway System.\nvar features = ee.FeatureCollection.loadBigQueryTable({\n table: 'bigquery-public-data.new_york_subway.stations',\n geometryColumn: 'station_geom',\n});\n\n// Display all relevant features on the map.\nMap.setCenter(-73.90, 40.73, 11);\nMap.addLayer(features,\n {'color': 'black'},\n 'Stations from New York Subway System');\n\n// Print all stations in the \"Astoria\" line.\nvar line = features.filter(ee.Filter.eq('line', 'Astoria'));\nprint(line);\nMap.addLayer(line,\n {'color': 'yellow'},\n 'Astoria line');\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Load stations from the New York Subway System.\nfeatures = ee.FeatureCollection.loadBigQueryTable(\n table=\"bigquery-public-data.new_york_subway.stations\",\n geometryColumn=\"station_geom\")\n\n# Display all relevant features on the map.\nm = geemap.Map()\nm.set_center(-73.90, 40.73, 11)\nm.add_layer(\n features, {'color': 'black'}, 'Stations from New York Subway System')\n\n# Print all stations in the \"Astoria\" line.\nline = features.filter(ee.Filter.eq('line', 'Astoria'))\ndisplay(line)\nm.add_layer(line, {'color': 'yellow'}, 'Astoria line')\nm\n```"]]