Introduction
Most integration landscapes have a handful of data preparation tasks that repeat on a clock: filter yesterday’s records, remove duplicates, roll up daily metrics, refresh a reporting table. The default instinct is often to build this logic inside SAP Cloud Integration itself, Groovy scripts, Content Modifiers, mapping steps, and move the data through CPI to get there.
That works, but it puts SAP CI in a role it isn’t built for: a data processing engine. Every record that needs filtering or aggregating must pass through the integration flow’s memory and message model, which does not scale well for large tables and adds processing time that has nothing to do with integration logic.
There is a simpler split. SAP CI already ships a Google BigQuery adapter that can talk to BigQuery’s Jobs resource directly. Instead of pulling data into CPI to transform it, SAP CI can trigger a BigQuery Job on a schedule and let BigQuery do the heavy lifting where the data already lives, then simply monitor the outcome.
What Is a BigQuery Job, and Why Trigger It from SAP CI?
A BigQuery Job is BigQuery’s own unit of asynchronous work: a query, load, extract, or copy operation that BigQuery executes internally and tracks by a Job ID. You don’t get results back inline the way you would from a normal API call, you submit the job, BigQuery runs it against its own compute, and you check back on its status.
That asynchronous model is exactly why pairing it with SAP CI works well. SAP CI’s Google BigQuery adapter can submit a job (an INSERT operation on the Jobs resource) and later poll for its status, without ever having the underlying dataset pass through the integration flow. The data never leaves BigQuery; only the instruction to process it, and the status of that instruction, cross the wire.
|
SAP CI |
BigQuery Jobs |
|
|
Schedules execution (daily/weekly/monthly) |
Yes |
— |
|
Triggers the job via the adapter |
Yes |
— |
|
Monitors job status and handles notifications/errors |
Yes |
— |
|
Executes the SQL (filter, dedupe, aggregate, transform) |
— |
Yes |
|
Performs MERGE/UPSERT into target tables |
— |
Yes |
|
Loads, copies, or exports data |
— |
Yes |
|
Stores results for reporting/analytics |
— |
Yes |
The Processing Capabilities Behind the Job
A single BigQuery Job is really a SQL statement (or a load/export configuration) that can combine several operations in one pass. The common recurring-processing patterns look like this:
Filtering and deduplication. The job reads from a staging table and applies WHERE clauses or windowed ROW_NUMBER() logic to drop duplicate or irrelevant rows before anything downstream sees them.
Good fit: staging tables that accumulate raw or repeated inserts between runs.
Keep in mind: dedup logic needs a clear key (natural key, hash, or load timestamp) or it will silently keep the wrong duplicate.
Aggregation and metrics calculation. The job groups and summarizes, daily sales totals, counts, averages, turning row-level detail into the shape a dashboard actually consumes.
Good fit: reporting tables that are read far more often than the raw data they’re built from.
Keep in mind: aggregation windows (daily vs. rolling vs. month-to-date) should be explicit in the SQL, not assumed.
MERGE/UPSERT into the target table. Rather than truncating and reloading, the job issues a MERGE statement that updates changed rows and inserts new ones, so the target table stays incremental.
Good fit: reporting tables that need same-day, idempotent refreshes.
Keep in mind: a poorly scoped MERGE condition can update far more rows than intended, test it against a small partition first.
SAP CI’s Role: Orchestration, Not Computation
SAP CI’s job in this pattern is deliberately narrow:
- A Timer start event fires the iFlow on the configured schedule.
- The Google BigQuery adapter submits the job (equivalent to a Jobs.insert call) with the SQL or job configuration to run.
- The iFlow polls job status (Jobs.get) until the job reports success, failure, or timeout.
- On failure, the iFlow raises a notification (email, Slack, monitoring alert) rather than trying to fix or retry the data logic itself.
No payload of business data flows through the integration flow. What flows through is a job reference and a status, which is what keeps this pattern lightweight even as the underlying tables grow into millions of rows.
Scheduler
Sample Job Configuration
Example Scenario
Every night, an SAP CI iFlow triggers a BigQuery Job. The job reads from a staging table, removes duplicates, calculates daily sales metrics, and runs a MERGE into a reporting table. SAP CI never touches the sales records themselves, it starts the job, waits for BigQuery to report completion, and alerts the integration team only if the job fails. By morning, the reporting table is ready and dashboards reflect current data, without a single row having passed through CPI’s runtime.
When Should You Use This Pattern?
- Recurring batch prep (daily/weekly refreshes, metric rollups): trigger a BigQuery Job on a timer; this is the core use case.
- Large or growing staging tables: keep the transformation in BigQuery rather than routing volume through SAP CI, where message size and processing time become constraints.
- Logic that changes often (a metric definition, a new dedup rule): since the logic lives in the job’s SQL, it can be updated without touching the iFlow itself.
- Low-volume, one-off transformations: if the data is small and infrequent, doing it inline in SAP CI may still be simpler than standing up a scheduled job.
Final Takeaway
The pattern here is a division of labour, not a workaround: SAP CI stays in the role it’s actually good at , scheduling, triggering, monitoring, alerting , while BigQuery does what its engine is built for: filtering, deduplicating, aggregating, and merging at scale. The result is less integration complexity, no large datasets moving through CPI’s runtime, and recurring data processing that scales with the data rather than with the integration flow.
Read More Technology Blog Posts by Members articles
#abap