[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[],[],null,["# BigQuery integrations\n\nBigQuery excels as a serverless data warehouse for petabyte-scale SQL\nanalysis, including vector data using the `GEOGRAPHY` data type. Google Earth\nEngine provides a planetary-scale platform specializing in geospatial raster\nanalysis and offers a vast data catalog. Their combination creates a uniquely\ncomprehensive environment for tackling complex geospatial challenges that\ninvolve both vector and raster data.\n\nThe integration of BigQuery and Earth Engine enables efficient workflows where\nBigQuery's vector data can be enriched with Earth Engine's raster insights, and\nEarth Engine analyses can access data stored and managed in BigQuery. By using\nboth, you gain access to:\n\n- **BigQuery**: Scalable storage and SQL-based analysis for large vector datasets.\n- **Earth Engine**: Powerful processing of petabytes of raster data and access to a rich geospatial catalog.\n\nThe primary ways these platforms interoperate are:\n\n- **Querying raster data within BigQuery** : Using the `ST_REGIONSTATS` SQL function to perform zonal statistics directly in BigQuery.\n- **Reading BigQuery data into Earth Engine** : Accessing BigQuery tables or query results as `ee.FeatureCollection` objects for use in Earth Engine scripts.\n- **Writing Earth Engine data to BigQuery** : Exporting `ee.FeatureCollection` results from Earth Engine analyses to BigQuery tables for storage and further analysis.\n\nThe following sections provide additional details about each of these features.\n\nQuery raster data within BigQuery\n---------------------------------\n\nThe BigQuery `ST_REGIONSTATS` function brings Earth Engine's raster analysis\nto BigQuery SQL. It calculates regional statistics on raster data for BigQuery\ntables with `GEOGRAPHY` data.\n\n- **Key use:** Zonal statistics and raster analysis within BigQuery.\n- **Data sources:** Analytics Hub, Cloud Storage GeoTIFF, Earth Engine assets.\n\nThis function lets you query Earth Engine's 100+ PB geospatial\n[data catalog](/earth-engine/datasets) directly within BigQuery. You can also\napply this function to your own Earth Engine assets as well as GeoTIFFs in\nCloud Storage.\n\nLearn more about `ST_REGIONSTATS` in BigQuery's\n[Work with raster data](https://cloud.google.com/bigquery/docs/raster-data)\npage.\n\nRead BigQuery data from Earth Engine\n------------------------------------\n\nEarth Engine can directly access BigQuery data as `ee.FeatureCollection`\nobjects, allowing you to visualize and incorporate BigQuery data in Earth Engine\nanalyses.\n\n- `ee.FeatureCollection.loadBigQueryTable()`: Reads a BigQuery table into Earth Engine.\n- `ee.FeatureCollection.runBigQuery()`: Executes a BigQuery SQL query and retrieves results into Earth Engine.\n\nThese functions enable seamless use of BigQuery's vector data within Earth\nEngine's raster-centric geospatial analysis platform.\n\nLearn more about these functions in the\n[Read from BigQuery](/earth-engine/guides/read_from_bigquery)\npage.\n\nWrite Earth Engine vector data to BigQuery\n------------------------------------------\n\nEarth Engine can export vector data to BigQuery using the\n[`Export.table.toBigQuery()`](/earth-engine/apidocs/export-table-tobigquery)\nfunction.\n\n- **Functionality:** Exports `ee.FeatureCollection` objects to BigQuery tables.\n- **Benefits:** Enables further analysis, integration, and storage of Earth Engine results in BigQuery.\n\nThis facilitates a workflow where vector data results from Earth Engine's\nprocessing are readily available in BigQuery.\n\nLearn more about writing Earth Engine vector data to BigQuery in the\n[Exporting to BigQuery](/earth-engine/guides/exporting_to_bigquery) page."]]