- https://cloud.google.com/storage/docs/overview
- https://cloud.google.com/storage/docs/creating-buckets
- https://cloud.google.com/iam/docs/creating-managing-service-account-keys
- https://cloud.google.com/storage/docs/json_api/v1/objects/insert
- https://cloud.google.com/storage/docs/best-practices
- Event-to-Object Serialization into GCS.
- Secure OAuth2-based Authentication using Service Account Key.
- Time-windowed or event-key-based file grouping.
- Data Format Support: JSON, CSV, Avro (based on transform).
- Automatic Object Upload per message or per batch window.
- The connector listens to a specified Condense input topic.
- Events are serialized to the desired file format (usually JSON).
- The connector authenticates to GCP using the Service Account Key.
- Each event (or batch) is written as a new object to the configured GCS bucket.
- Object filenames can be time-stamped or event-key derived for uniqueness.
Field-by-Field Explanation
1. Title
Purpose: Internal name used within Condense to reference this connector.
Guidelines: Must be unique within a workspace.
Example:
gcs-sensor-dump
ml-training-dataset-out
2. Google Bucket Name
Definition: The exact name of the destination GCS bucket.
Requirements:
- Must exist before use; connector does not create buckets.
- The configured service account must have write access.
iot-stream-backups
condense-ml-records
3. Service Account Key
Type: Raw JSON credential file content (not a file path).
Required IAM Role: roles/storage.objectAdmin on the bucket.
Security: Ensure this key is managed securely and rotated periodically.
How to Generate:
- Visit IAM & Admin → Service Accounts in GCP Console.
- Create or choose a service account.
- Assign the required Storage role.
- Generate and download the key as JSON.
sensor_readings
vehicle_alerts_processed
Sample Configuration Example
- Check if the service account has the correct permissions (
roles/storage.objectAdmin). - Verify that the bucket name is correct and exists.
- May be caused by an incorrect bucket region.
- Ensure object size does not exceed 5 TB per object.
- Verify that object names are correctly formatted.
- Ensure events from the input topic are JSON serializable.
- Avoid binary payloads unless explicitly encoded in a transform.
- Check Condense logs for ingestion or transform bottlenecks.
- Ensure there is no backpressure from downstream logic.
- Condense assigns filenames based on event timestamp by default (for example,
event-20250725T1543Z.json). - You can use a pre-transform to enrich events with metadata that controls naming or folder structure.
- While JSON is the default, Condense transforms can be used to serialize data to Avro or CSV prior to upload.
- Use native GCS Object Lifecycle Rules to automatically expire files after defined retention periods.
- GCS supports gzip-compressed objects.
- Use a transform to compress data before passing it to this connector.
- Use separate buckets for staging, production, and archival environments.
- Monitor upload metrics using Google Cloud Monitoring and Condense connector logs.
- Validate object writes with automated tests or checksum logic.
- Periodically rotate and restrict service account credentials.
- Use partitioned folder naming (for example,
year=2025/month=07/day=25/) to simplify downstream integration with BigQuery.