GCP-backed
Configure a Google Cloud Storage Lakehouse destination for Nilus batch and CDC pipelines.
The GCP-backed DataOS Lakehouse destination writes Apache Iceberg-backed datasets into a Lakehouse Depot whose storage layer is Google Cloud Storage (GCS). Nilus uses the same Lakehouse connector for every cloud. The Lakehouse Depot selects the storage backend, not a separate connector type. AWS-backed, Azure-backed, and GCP-backed Lakehouse Depots all share the same pipeline shape, sink address pattern, and table behavior. This page covers the GCP / GCS variant. The AWS-backed DataOS Lakehouse and Azure-backed DataOS Lakehouse variants are documented separately.
Requirements
Connectivity and credentials must both be in place before the pipeline can run.
Connectivity
The Nilus runtime must reach the configured GCS endpoint and the Iceberg REST catalog identified by
METASTORE_URL.The Lakehouse Depot must be defined in DataOS, with
storageType: gcsand aspec.gcsblock, and must be reachable from the runtime cluster.
Lakehouse depot shape
For a GCS-backed Lakehouse the Depot resource carries:
spec:
storageType: gcs
gcs:
bucket: my-iceberg-bucket
relativePath: warehouse/ # optional sub-prefix
endpoint: https://storage.googleapis.com # optional, for private/sovereign GCS endpointsThe runtime resolves the bucket URL as gs://<bucket>/<relativePath>. When the Depot sets endpoint, Nilus projects it as GCS_ENDPOINT and passes it to the GCS client as the service host. Use it for Private Google Access or non-default GCS endpoints. Custom endpoints are honored consistently across batch, CDC, stream, and metadata pipelines.
Storage credentials projected from the Depot's secret (service-account JSON file is the only supported credential shape):
gcp_json_key
Yes
Service-account JSON key file. The runtime projects it to a file path and points the GCS client at it.
The service account must have the following GCS roles on the configured bucket / prefix: roles/storage.objectAdmin (or an equivalent custom role granting storage.objects.create, storage.objects.delete, and storage.objects.list).
Permissions
The Depot's service account must be able to read, write, and delete objects under the configured bucket / prefix.
The runtime must be authorized to register tables in the Iceberg REST catalog. The Lakehouse Depot secret must include an
apikey(a DataOS API token). Nilus reads it asLAKEHOUSE_APIKEYand passes it to the Iceberg REST catalog as the connection token. If the secret has noapikey, the pipeline fails at startup with'apikey' is required in Lakehouse depot secret.
Sink address
Reference the Lakehouse Depot by name; the address format is the same for every cloud backend:
Providing a lakehouse:// URI directly in a manifest is not supported. Always go through the Depot.
Sink options
dest_table
Yes
Target Iceberg table in <schema>.<table> form. Exactly two dot-separated parts.
incremental_strategy
Yes
One of replace, append, merge.
iceberg_metadata_compression
No
Compression codec for Iceberg metadata files. gzip (default) or none.
partition_by
No
Iceberg partition spec (list of column / transform pairs). See Optimize sink datasets.
GCP-backed Lakehouses do not take cloud-specific sink options. Bucket name, prefix, and credentials all come from the Depot.
Iceberg metadata compression
Nilus compresses Iceberg metadata files with gzip by default. To change this, set the iceberg_metadata_compression sink option:
Valid values are "gzip" and "none"; use lowercase only. Other casings such as "Gzip" or "None" are rejected by schema validation. Changing this setting between runs is safe: it does not rewrite or invalidate the metadata of existing tables, and pipelines that never set it continue to use the gzip default.
Sample Nilus configs
Each example below is self-contained and uses the current Nilus pipeline shape.
Batch ingestion
CDC ingestion
Behavior and capabilities
Table format: Apache Iceberg. Nilus writes Parquet data files to GCS and registers / updates the resulting tables in the Iceberg REST catalog.
Object model: Iceberg tables addressed as
<schema>.<table>.Supported pipeline types:
batchandcdc.Supported incremental strategies:
replace,append,merge.Storage layer: Google Cloud Storage (GCS).
Decimal types: A table read from any SQL batch source preserves the source decimal precision and scale. A
query:extract stores decimals as Icebergdecimal(38,9). Do not switch extract styles for the samedest_table. See Schema evolution.
Troubleshooting
METASTORE_URL environment variable is required for Lakehouse destination
The Depot did not project METASTORE_URL into the runtime.
Re-check the Lakehouse Depot configuration; verify the Iceberg REST catalog endpoint is set on the Depot resource.
Unsupported scheme: <X>. Expected 'lakehouse://'
The manifest authored a non-dataos:// URI that did not resolve to a Lakehouse Depot.
Always reference the Lakehouse via dataos://<lakehouse-depot>.
Table name must be in the format <schema>.<table>
dest_table is missing the schema prefix or has more than two parts.
Use exactly <schema>.<table>.
GCS write fails with 403 / forbidden
The Depot's service account lacks object create / delete permission on the bucket.
Re-check the Depot secret and the IAM bindings on the GCS bucket.
Could not find credentials file
The Depot did not project the gcp_json_key secret into the runtime correctly.
Re-check the Depot secret reference and that the project key contains valid service-account JSON.
Iceberg commit fails with 409 Conflict
Concurrent writers from another pipeline are competing on the same target table.
Serialize writes per Iceberg table, or use distinct destination tables per pipeline.
ValueError: Cannot serialize value, scale of value does not match type decimal(38, 9): 4
The table was created by a query: extract (decimal(38,9)), then a table read from a SQL batch source tried to write source-scale decimals such as DECIMAL(20,4) or NUMERIC(20,4), or the reverse. Switching extract styles for the same dest_table is not supported.
Keep one extract style per table. Point dest_table at a new table, or drop and reload. See Schema evolution.
Related docs
Optimize sink datasets: guidance on
incremental_strategyand dataset-shape tuning for Iceberg targets.
Last updated
Was this helpful?