To ingest data from Bigtable, use the following steps to create
a data store and ingest data using the API.
Set up Bigtable access
To give Gemini Enterprise access to Bigtable data that's
in a different project, follow these steps:
Replace the following PROJECT_NUMBER variable with your
Gemini Enterprise project number, then copy the contents of this
code block. This is your Gemini Enterprise service account
identifier:
service-PROJECT_NUMBER@gcp-sa-discoveryengine.iam.gserviceaccount.com`
Go to the IAM & Admin page.
IAM & Admin
Switch to your Bigtable project on the IAM & Admin page
and click Grant Access.
For New principals, enter the instance's service account identifier and
select the Bigtable > Bigtable Reader role.
Click Save.
Switch back to your Gemini Enterprise project.
Next, go to Import data from Bigtable.
Import data from Bigtable
To use the command line to create a data store and ingest data from
Bigtable, follow these steps:
Import data from Bigtable.
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/dataStores/DATA_STORE_ID/branches/0/documents:import" \
-d '{
"bigtableSource ": {
"projectId": "BIGTABLE_PROJECT_ID",
"instanceId": "INSTANCE_ID",
"tableId": "TABLE_ID",
"bigtableOptions": {
"keyFieldName": "KEY_FIELD_NAME",
"families": {
"key": "KEY",
"value": {
"fieldName": "FIELD_NAME",
"encoding": "ENCODING",
"type": "TYPE",
"columns": [
{
"qualifier": "QUALIFIER",
"fieldName": "FIELD_NAME",
"encoding": "COLUMN_ENCODING",
"type": "COLUMN_VALUES_TYPE"
}
]
}
}
...
}
},
"reconciliationMode": "RECONCILIATION_MODE",
"autoGenerateIds": "AUTO_GENERATE_IDS",
"idField": "ID_FIELD",
}'
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 2026-06-11 UTC.