GCS storage
This document describes current Google Cloud Storage (GCS) support in Floe. Floe reads and writes
objects with obstore; Iceberg tables are written through PyIceberg’s PyArrow file IO.
Requirements
Section titled “Requirements”Install the extra: pip install 'floe-python[gcs]'. A config with a type: gcs storage fails
validation without it.
Credentials come from the environment, never from the config: Application Default Credentials, for example:
GOOGLE_APPLICATION_CREDENTIALS(path to a service account key file)GOOGLE_SERVICE_ACCOUNTorGOOGLE_SERVICE_ACCOUNT_KEY- the metadata server on Google Cloud compute, or
gcloud auth application-default loginlocally
The identity needs read, write and delete on the bucket’s objects: Floe writes the incremental state, archives sources by copy then delete, and removes superseded files.
Config example
Section titled “Config example”storages: default: local definitions: - name: local type: local - name: gcs_raw type: gcs bucket: my-bucket prefix: raw/data
entities: - name: customers source: format: csv path: inbox/customers storage: gcs_raw sink: accepted: format: parquet path: outbound/customers storage: gcs_raw rejected: format: csv path: outbound/customers_rejected storage: gcs_raw policy: severity: reject schema: columns: - name: customer_id type: stringbucket is required; prefix is optional. Resolved URIs are formed as:
gs://<bucket>/<prefix>/<path>URI forms
Section titled “URI forms”A path is relative to the storage (and its prefix), or an explicit gs:// URI of the same
bucket. Nothing else is accepted: gcs:// and other schemes fail validation, and a gs:// URI of
another bucket fails with a bucket mismatch.
An object key has no leading / and no empty segment (a//b): Floe refuses such a path instead
of letting the store name another object.
Emulators
Section titled “Emulators”endpoint points Floe at a GCS-compatible service, for example http://127.0.0.1:4443. Plain http:// is allowed for an endpoint. For Iceberg, Floe passes it to
PyIceberg as gcs.service.host; without endpoint, PyIceberg uses Application Default Credentials.
fake-gcs-server 1.56.1 has no XML-API upload route and ignores the generation-precondition header that
obstore sends (#1342), so Floe does not work against it as is. CI runs the gcs tests against it behind a
test-only XML upload shim; that is emulator coverage, not a validation of Google Cloud Storage.
Supported behavior
Section titled “Supported behavior”- Inputs: CSV, TSV, JSON (array/ndjson), ORC, Parquet, XLSX, Avro and XML, by prefix listing plus suffix filtering, downloaded to a temp directory and read locally.
- Outputs: accepted Parquet parts, rejected CSV or Parquet parts, and JSON reports, each built in
memory then uploaded. Accepted and rejected Iceberg tables with
overwriteorappend, through an Iceberg catalog whose table data lives on the GCS storage (also as the catalog’swarehouse_storage); no emulator run covers Iceberg on GCS, so it isuntestedend to end. - Incremental state and
sink.archive. - The state file is coordinated by compare-and-swap on the object’s generation, see the decision record.
Prefix matching
Section titled “Prefix matching”A source path is a prefix, as on S3. A literal prefix without a trailing / matches by string
prefix, so data/inbox also matches data/inbox/a.csv and data/inbox_old/b.csv; add the / to
match the directory only. A glob in the path needs a non-empty literal prefix before the first
wildcard. Listing is recursive and sorted by key.
Limitations
Section titled “Limitations”- Iceberg merges (
merge_scd1,merge_scd2) and compaction on GCS fail the run withconfig_not_supported: DuckDB’s GCS secret takes HMAC keys only, not Application Default Credentials.floe validatedoes not catch it. - Delta on GCS is refused with
config_not_supported. floe maintainlists table locations ongcsthrough the object-store client.floe manifest generateandfloe manifest replaysupportgcs: the manifest records thegs://URIs the run writes, and a replay writes its report there.- A manifest (
--manifest,manifest generate -o) and a profile (-p) can be read and written at ags://URI, as ats3://andabfss://(profiles); CI covers it with an in-memory object store only. - What is tested, and against which emulator: support matrix.
- Parquet and ORC inputs use a temp download plus a local read, as on S3.
Synced from floe @ v1.1.0 (313b534), docs/storages/gcs.md.