How to build comprehensive customer financial profiles with Elastic Cloud and Google Cloud
![illustration-customer-financial-data-1689x980.png](https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt8e5f26161f9fbf04/63eab1ea64d283110a263462/illustration-customer-financial-data-1689x980.png)
Financial institutions have vast amounts of data about their customers, but many of them struggle to use that data to their advantage. Data may be sitting in silos or trapped on costly mainframes. Customers may only have access to a limited quantity of data, and service providers may need to search through multiple systems of record to handle a simple customer inquiry. This creates a hazard for providers and a headache for customers.
Elastic and Google Cloud enable institutions to manage this information effectively. Powerful search tools allow data to be surfaced faster than ever — whether it's card payments, ACH (Automated Clearing House), wires, bank transfers, real-time payments, or another payment method. This information can be correlated to customer profiles, cash balances, merchant info, purchase history, and other relevant information to enable the customer or business objective.
This reference architecture enables these use cases:
1. Offering a great customer experience: Customers expect immediate access to their entire payment history, with the ability to recognize anomalies — not just through digital channels, but through omnichannel experiences (e.g., customer service interactions).
2. Customer 360: Real-time dashboards that correlate transaction information across multiple variables, offering the business a better view into its customer base and driving efforts for sales, marketing, and product innovation.
![](https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt1ebafcf1aa322c13/63eab3ae7c0ff85658855c3f/blog-elastic-google-cloud-transaction.png)
3. Partnership management: Merchant acceptance is key for payment providers. Having better access to present and historical merchant transactions can enhance relationships or provide leverage in negotiations. With that, banks can create and monetize new services.
4. Cost optimization: Mainframes are not designed for internet-scale access. Alongside technological limitations, the cost becomes a prohibitive factor. While Mainframes will not be replaced any time sooner, this architecture will help to avoid costly access to data to serve new applications.
5. Risk reduction: By standardizing on the Elastic Stack, banks are no longer limited in the number of data sources they can ingest. With this, banks can better respond to call center delays and potential customer-facing impacts like natural disasters. By deploying machine learning and alerting features, banks can detect and stamp out financial fraud before it impacts member accounts.
![](https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt293c4ff835f106f5/63eab3d56a8e871a43ff1a86/blog-elastic-google-cloud-risk-reduction.png)
Architecture
The following diagram shows the steps to move data from Mainframe to Google Cloud, process and enrich the data in BigQuery, and then provide comprehensive search capabilities through Elastic Cloud.
![](https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blta4de53a84b5049e2/63eab3fc167c064eec4b41e4/blog-elastic-google-cloud-architecture.png)
This architecture includes the following components:
Move data from Mainframe to Google Cloud
Moving data from IBM z/OS to Google Cloud is straightforward with the Mainframe Connector, by following simple steps and defining configurations. The connector runs in z/OS batch job steps and includes a shell interpreter and JVM-based implementations of gsutil, bq, and gcloud command-line utilities. This makes it possible to create and run a complete ELT pipeline from JCL, both for the initial batch data migration and ongoing delta updates.
A typical flow of the connector includes:
- Reading the mainframe dataset
- Transcoding the dataset to ORC
- Uploading ORC file to Cloud Storage
- Registering ORC file as an external table or loading as a native table
- Submitting a Query job containing a MERGE DML statement to upsert incremental data into a target table or a SELECT statement to append to or replace an existing table
Here are the steps to install the BQ MainFrame Connector:
- Copy mainframe connector jar to unix filesystem on z/OS
- Copy BQSH JCL procedure to a PDS on z/OS
- Edit BQSH JCL to set site specific environment variables
Please refer to the BQ Mainframe connector blog for example configuration and commands.
Process and enrich data in BigQuery
BigQuery is a completely serverless and cost-effective enterprise data warehouse. Its serverless architecture lets you use SQL language to query and enrich enterprise scale data. And its scalable, distributed analysis engine lets you query terabytes in seconds and petabytes in minutes. An integrated BQML and BI Engine enables you to analyze the data and gain business insights.
Ingest data from BQ to Elastic Cloud
Dataflow is used here to ingest data from BQ to Elastic Cloud. It’s a serverless, fast, and cost-effective stream and batch data processing service. Dataflow provides an Elasticsearch Flex Template, which can be easily configured to create the streaming pipeline. This blog shows an example of how to configure the template.
Cloud orchestration from Mainframe
It's possible to load both BigQuery and Elastic Cloud entirely from a mainframe job, with no need for an external job scheduler.
To launch the Dataflow flex template directly, you can invoke the gcloud dataflow flex-template run command in a z/OS batch job step.
If you require additional actions beyond simply launching the template, you can instead invoke the gcloud pubsub topics publish command in a batch job step after your BigQuery ELT steps are completed, using the --attribute option to include your BigQuery table name and any other template parameters. The pubsub message can be used to trigger any additional actions within your cloud environment.
To take action in response to the pubsub message sent from your mainframe job, create a Cloud Build Pipeline with a pubsub trigger and include a Cloud Build Pipeline step that uses the gcloud builder to invoke gcloud dataflow flex-template run and launch the template using the parameters copied from the pubsub message. If you need to use a custom dataflow template rather than the public template, you can use the git builder to checkout your code followed by the maven builder to compile and launch a custom dataflow pipeline. Additional pipeline steps can be added for any other actions you require.
The pubsub messages sent from your batch job can also be used to trigger a Cloud Run service or a GKE service via Eventarc and may also be consumed directly by a Dataflow pipeline or any other application.
Mainframe capacity planning
CPU consumption is a major factor in mainframe workload cost. In the basic architecture design above, the Mainframe Connector runs on the JVM and runs on zIIP processor. Relative to simply uploading data to cloud storage, ORC encoding consumes much more CPU time. When processing large amounts of data, it's possible to exhaust zIIP capacity and spill workloads onto GP processors. You may apply the following advanced architecture to reduce CPU consumption and avoid increased z/OS processing costs.
Remote dataset transcoding on Compute Engine VM
![](https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blta5f0f57876f00a72/63eab4a6bc8ae610d2fd9d50/blog-elastic-google-cloud-remote-dataset-transcoding.png)
To reduce mainframe CPU consumption, ORC file transcoding can be delegated to a GCE instance. A gRPC service is included with the mainframe connector specifically for this purpose. Instructions for setup can be found in the Mainframe Connector documentation. Using remote ORC transcoding will significantly reduce CPU usage of the Mainframe Connector batch jobs and is recommended for all production-level BigQuery workloads. Multiple instances of the gRPC service can be deployed behind a load balancer and shared by all Mainframe Connector batch jobs.
Transfer data via FICON and Interconnect
![](https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/bltcaff3432d3ea9e55/63eab4bef10bb7743afcb054/blog-elastic-google-cloud-transfer-data-ficon.png)
Google Cloud technology partners offer products to enable the transfer of mainframe datasets via FICON and 10G ethernet to Cloud Storage. Obtaining a hardware FICON appliance and Interconnect is a practical requirement for workloads that transfer in excess of 500GB daily. This architecture is ideal for the integration of z/OS and Google Cloud because it largely eliminates data transfer-related CPU utilization concerns.
Ready to get started?
Start putting your data to work with Elastic on Google Cloud. Or, learn more about how financial institutions can turn their data into a strategic asset.
We really appreciate Jason Mar from Google Cloud who provided rich context and technical guidance regarding the Mainframe Connector, Eric Lowry from Elastic for his suggestions and recommendations, and the Google Cloud and Elastic team members who contributed to this collaboration.