@AISERVICE

To configure and enable the AI service before you configure the Replicat, see the steps provided in Configure and Use the AI Service in Oracle GoldenGate Microservices Documentation.

The @AISERVICE function enables inline AI processing directly within Oracle GoldenGate replication flows. It allows Replicat to invoke a configured AI model at apply time and use the result as part of the target mapping.

With @AISERVICE, AI enrichment becomes a native part of replication, eliminating the need for external pipelines, custom services, or post-processing steps.

Syntax

@aiservice(embed, model name, col)

Example

In the following example, the Replicat parameter file uses the @AISERVICE function to add an embedding for OpenAI's model called text-embedding-3-small for the column first_name in the hr.employees table.
REPLICAT RWEST
USERIDALIAS EAST DOMAIN OracleGoldenGate
DDL INCLUDE MAPPED
MAP hr.employees, TARGET hr.employees,
COLMAP (
    USEDEFAULTS,
    bio_embedding = @AISERVICE(embed,'text-embedding-3-small', first_name));

Note:

To be able to add the embedding in the Replicat parameter file for a schema, table, the embedding must be previously added to the target table. For example, you can alter the hr.employees table to add the OpenAI text-embedding-3-small (1536 dimensions), as shown in the following example:
ALTERTABLE hr.employees
ADD (
   bio_embedding VECTOR(1536, FLOAT32) -- text-embedding-3-small (default));