Realtime Parquet Ingestion into Google Cloud Storage with GoldenGate for Distributed Applications and Analytics 23.8 and later
This Quickstart covers a step-by-step process showing how to ingest parquet files into Google Cloud Storage buckets in real-time with GoldenGate for Distributed Applications and Analytics (GG for DAA).
This Quickstart is valid for GG for DAA 23.7 and later versions.
Google Cloud Storage (GCS) is a service for storing objects in Google Cloud Platform.
GG for DAA GCS handler works in conjunction with File Writer Handler and Parquet Handler (if parquet is required). File Writer Handler produces files locally, optionally Parquet Handler converts to parquet format and GCS Handler loads into GCS buckets.
Prerequisites
To successfully complete this quicktart, you must have the following:
-
A Google Cloud Storage Connection.
-
Google Cloud Storage Bucket
-
Google Service Account Key with Bucket and Object Permissions. For more information, see Replicate Data
-
Public access to your bucket (GG for DAA supports private bucket access, you can refer to GG for DAA document for details)
In this Quickstart, a sample trail file, such as tr) which is shipped with GG for DAA is used. If you want to continue with sample trail file, then it is located at GG_HOME/opt/AdapterExamples/trail/ in your GG for DAA instance.
Install Required Dependency Files
GG for DAA uses client libraries in the replication process and these libraries need to be downloaded before setting up the replication process. You can use dependency downloader to download the client libraries. Dependency downloader is a set of shell scripts that downloads dependency jar files from Maven and other repositories.
GG for DAA uses a 3-step process to ingest parquet into GCS buckets:
-
Generating local files from trail files
-
Converting local files to Parquet format
-
Loading files into GCS
For generating local parquet files with GG for DAA, replicat uses File Writer Handler and Parquet Handler. To load the parquet files into GCS, GG for DAA uses Google Cloud Storage Handler in conjunction with File Writer and Parquet Event Handler.
-
In your GG for DAA VM, go to dependency downloader utility. It is located at
GG_HOME/opt/DependencyDownloader/. -
Run
parquet.sh,hadoop.sh, andgcs.shwith the required versions. You can check the version and reported vulnerabilities in Maven Central. Figure 11: Install Required Dependency Files

-
Three directories are created in
GG_HOME/opt/DependencyDownloader/dependencies. Make a note of the directory. For example:-
/u01/app/ogg/opt/DependencyDownloader/dependencies/gcs_12.29.1 -
/u01/app/ogg/opt/DependencyDownloader/dependencies/hadoop_3.3.0 -
/u01/app/ogg/opt/DependencyDownloader/dependencies/parquet_1.12.3
-
Create a Replicat in Oracle GoldenGate for Distributed Applications and Analytics
- Go to Administration Service and click + sign to add a replicat. Figure 12: Administration Service

- Select the Replicat Type, enter the Process Name and click Next. There are two different Replicat types available: Classic and Coordinated. Classic Replicat is a single threaded process whereas Coordinated Replicat is a multithreaded one that applies transactions in parallel. Figure 13: Replicat Type

-
Enter Replicat Options and click Next.
-
Replicat Trail: Name of the required trail file. For sample trail, enter
tr. -
Subdirectory: Enter as
GG_HOME/opt/AdapterExamples/trail/if using the sample trail. -
Target: Google Cloud Storage
-
Format: Select the file format
Figure 14: Replicat Options
-

- Leave Managed Options as is and click Next. Figure 15: Managed Options

-
Provide Parameter File details and click Next. In the Parameter File, you can either specify source to target mapping or leave it as-is with a wildcard selection. If Coordinated Replicat is selected as the Replicat Type, then you need to provide an additional parameter as follows:
TARGETDB LIBFILE libggjava.so SET property=<ggbd-deployment_home>/etc/conf/ogg/your_replicat_name.propertiesFigure 16: Parameter File

-
In Properties File, update the properties marked as #TODO and click Create and Run. For example:
# Properties file for Replicat gg.target=gcs #TODO: format can be 'parquet' or 'orc' or one of the pluggable formatter types. Default is 'parquet'. gg.format=parquet #The GCS Event handler gg.eventhandler.gcs.pathMappingTemplate=${fullyQualifiedTableName}**#TODO: Edit the GCS bucket name** gg.eventhandler.gcs.bucketMappingTemplate=<gcs-bucket-name> **#TODO: Edit the GCS credentialsFile** gg.eventhandler.gcs.credentialsFile=/path/to/gcp/credentialsFile gg.eventhandler.gcs.finalizeAction=none **#TODO: Edit to include the GCS Java SDK**. gg.classpath=/path/to/gcs-deps/:/path/to/hadoop-deps/:/path/to/parquet_deps/* -
If replicat starts successfully, then it is in running state. You can go to replicat/statistics to see the replication statistics. Figure 17: Replication Statistics

- You can go to GCP Cloud Storage bucket and check the files. Figure 18: Google Cloud Storage Bucket

<div class="infoboxnote" markdown="1">
**Note:**
- If target GCS bucket does not exist, it will be auto created by GG for DAA. You can use [Template Keywords](additional-details.html#GUID-742BA6BE-D446-4E21-8E38-7105AC9F5E5E) to dynamically assign the container names.
- GCS Event Handler can be configured for proxy server. For more information, see [Google Cloud Storage Event Handler](google-cloud-storage.html#GUID-4952914B-032C-4DE9-B6F4-20BD6AE2D9D3).
</div>