Utility functions

This page describes the additional set of predefined Jsonnet functions for the Data Transformer Script task available in Application Integration.

Before you begin

To use the following predefined functions, you must import the functions library in your script. Importing the functions library lets you use both the standard Jsonnet functions and the predefined Data Transformer functions.

Application Integration supports Jsonnet functions library v0.20.0. For information about the Jsonnet standard functions, see Jsonnet Standard Library.

UUID

Syntax
        
uuid()
      
Description Generates a random universally unique identifier (UUID) as a STRING. The returned STRING consists of 32 hexadecimal digits in five groups separated by hyphens in the form 8-4-4-4-12. The hexadecimal digits represent 122 random bits and 6 fixed bits, in compliance with RFC 4122 section 4.4. The returned STRING is lowercase.
Input parameter N/A
Return type STRING
Output Returns the generated UUID in string format.

Integration name

Syntax
        
getIntegrationName()
      
Description Get the name of the current integration.
Input parameter N/A
Return type STRING
Output Returns the name of the current integration.

Integration region

Syntax
        
getIntegrationRegion()
      
Description Get the region of the current integration.
Input parameter N/A
Return type STRING
Output Returns the region of the current integration.

Integration version ID

Syntax
        
getIntegrationVersionId()
      
Description Get the integration version ID of the current integration.
Input parameter N/A
Return type STRING
Output Returns the integration version ID of the current integration.

Integration version number

Syntax
        
getIntegrationVersionNumber()
      
Description Get the version number of the current integration.
Input parameter N/A
Return type NUMBER
Output Returns the version number of the current integration.

Execution ID

Syntax
        
getExecutionId()
      
Description Get execution ID of the current integration execution.
Input parameter N/A
Return type STRING
Output Returns the execution ID of the current integration execution.

Project ID

Syntax
        
getProjectId()
      
Description Get the Google Cloud project ID of the current integration.
Input parameter N/A
Return type STRING
Output Returns the Google Cloud project ID of the current integration.

Recommendation