Start a new topic

User variables used in SemQL enrichers

I would like to know if we can set a "user" variable and assigning it a value at the job level  like we do with the JOB parameters,  and which would then be available to be used in a SemQL enricher ?


Something in the "spirit" of the  Variables and parameters :: Semarchy xDM Doc but set by ourselves whith its value set just at the JOB scope level.


If this is not possible, I would like to have of how do we set a Model variable and it possible an example of its usage in a SemQL enricher.


1 Comment

Hi Joao,
Great question. Here is a quick breakdown of how xDM handles those two scenarios:
1. Job-Level Variables Right now, you can't pass a custom, user-defined variable directly into a SemQL enricher dynamically per job run.

2. Model Variables
These are really designed for environment-wide settings (like a default value that changes between your DEV and PROD environments), rather than changing per job.

If you want to set one up and use it in an enricher:

  • Create a Variable Value Provider (VVP) using the DataSource plug-in.
  • Link that VVP to your Model Variable in the Application Builder.
  • VVPs run standard physical SQL directly against your database, bypassing SemQL. Because of this, your query must use the exact physical table and column names xDM generated in the backend (like GD_CUSTOMER), rather than the logical entity names you see in the builder.
  • Once set up, you can call it in your SemQL enricher using the standard syntax, like this: {YourModelVariable}.


Best,
Ben

Login to post a comment