DatavineDatavine/Docs
Getting Started

Connecting a GCP Project

Connect your Google Cloud Platform project to Datavine using a service account. You can connect multiple projects and switch between them at any time.

Required IAM roles

Your service account needs these IAM roles at minimum. Grant them at the project level in Google Cloud Console → IAM & Admin → IAM.

roles/bigquery.dataViewer

Read datasets, tables, and query results.

Required
roles/bigquery.jobUser

Run queries, see job history, and access INFORMATION_SCHEMA.

Required
roles/bigquery.metadataViewer

Required for pipeline monitoring, usage analytics, and job history.

Optional
roles/aiplatform.user

Required for all AI features: SQL generation, Data Chat, anomaly analysis, cost AI, and the Pipeline Agent.

Required

Creating a service account

Via Google Cloud Console

  1. Go to IAM & Admin → Service Accounts
  2. Click + Create Service Account
  3. Name it datavine-reader
  4. Grant the roles above and click Done
  5. Click the service account → KeysAdd KeyCreate new keyJSON
  6. The JSON file downloads automatically — keep it safe

Via gcloud CLI

bash
# Create service account
gcloud iam service-accounts create datavine-reader \
  --project=YOUR_PROJECT_ID \
  --display-name="Datavine Reader"

# Grant BigQuery roles
gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \
  --member="serviceAccount:datavine-reader@YOUR_PROJECT_ID.iam.gserviceaccount.com" \
  --role="roles/bigquery.dataViewer"

gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \
  --member="serviceAccount:datavine-reader@YOUR_PROJECT_ID.iam.gserviceaccount.com" \
  --role="roles/bigquery.jobUser"

# Grant Vertex AI access (required for AI features)
gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \
  --member="serviceAccount:datavine-reader@YOUR_PROJECT_ID.iam.gserviceaccount.com" \
  --role="roles/aiplatform.user"

# Download the key file
gcloud iam service-accounts keys create datavine-key.json \
  --iam-account=datavine-reader@YOUR_PROJECT_ID.iam.gserviceaccount.com
You also need to enable the Vertex AI API in your GCP project. Go to APIs & Services → Vertex AI API and click Enable. Without this, all AI features (SQL generation, Data Chat, anomaly analysis, cost AI, Pipeline Agent) will fail.

Connecting in Datavine

  1. Go to Settings → Connections or click Connect Project on the dashboard
  2. Enter your GCP Project ID — found in the console header (e.g. my-project-123456)
  3. Upload the service account JSON file
  4. Click Connect — Datavine verifies the connection by listing datasets
Credentials are AES-256 encrypted before storage and are never accessible from the browser. The key is decrypted only server-side when executing queries.

Troubleshooting

Permission denied on datasets

Check that the service account has bigquery.dataViewer at the project level, not just dataset level.

Cannot list jobs / pipeline history empty

The service account needs bigquery.jobs.list. Add roles/bigquery.metadataViewer.

Invalid credentials error

Ensure you uploaded the correct JSON file and the service account belongs to the correct project.

Project not found

Double-check the Project ID — it's not the project name. Find it in the console header or with gcloud projects list.

AI features return errors / 403

Ensure the Vertex AI API is enabled in your GCP project and the service account has roles/aiplatform.user. Go to APIs & Services → Vertex AI API → Enable.