> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GCP Spark with validated operational publication

> Publish exact invoice totals, investigate exceptions, and retain decisions as source corrections arrive.

Part of [Invoice exceptions from complete data releases](/use-cases/sales-exceptions/index).

## Complete stack

| System | Custody | Role | Owner | State | Version source | Failure contract |
| - | - | - | - | - | - | - |
| bijection | run | Bounded exact-money transformation, atomic releases, source history and analyst decisions | Application owner | Up to eight complete releases and 32 separate reviews in PostgreSQL | CLI/backend digests and application source digest | Invalid outputs, conflicting release identities and stale decisions fail before commit. |
| postgres | run | Operational persistence | Qualification resource owner | Disposable local cluster | Installed PostgreSQL executable recorded at execution | Cleanup stops only the exact owned cluster. |
| spark | run | Compute complete invoice aggregates outside Bijection | Run resource owner | One deterministic serverless batch; maximum 20 minutes | Pinned GCP Spark runtime 2.2 and captured transform script | Ambiguous creation is reconciled by batch identity; cleanup waits for terminal state before deleting. |
| storage | run | Carry immutable batch inputs, outputs and provider staging files | Run resource owner | One labeled run bucket with uniform access and no public grant | GCS object generations and source digests | Cleanup removes all object generations and verifies the bucket is absent. |

## Connections

* **bijection → postgres:** Transactional release selection and decisions. Identity: Backend database credential.
* **spark → storage:** JSON input and exact decimal output with a 256-row bound. Identity: Explicit project service account.
* **storage → bijection:** Validate complete transformed releases before atomic selection. Identity: Authenticated publisher.

## Deployment inputs

* `backend` (file, required): Native Bijection backend executable.
* `cli` (file, required): Bijection CLI executable.
* `sdk` (directory, required): Built Bijection SDK directory.
* `gcp-config` (credential-file, required): Private JSON file naming project, region, serviceAccount, subnetwork and costEstimate; authentication uses the selected gcloud account.

## Bounds and cleanup

One serverless batch: 4-core driver, two 4-core executors, 4 GiB per process including overhead, 250 GiB disks, autoscaling disabled, 20-minute TTL. These are provider minimums, above the ordinary one-CPU trial size.

Maximum duration: 2400 seconds. Maximum captured log: 4194304 bytes.

Estimated cost: Provide a dated regional estimate in gcp-config. Upper runtime allocation is 4 vCPU-hours plus 250 GiB-hours of disk; storage and requests are additional. TTL bounds compute, not teardown.

Cleanup: Reconcile and stop the exact batch, wait for terminal state, delete it, delete every generation in the labeled run bucket, then verify both resources are absent; separately stop the owned local backend and PostgreSQL.

The executable runbook is maintained at `examples/sales-exceptions/recipes/gcp-spark/runbook.md`. A declared journey is verified only when every named check appears in a successful execution report and cleanup has been observed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.