Skip to main content

UDP Utils

The Syntasa application provides UDP utilities that allow you to interact with UDP mappings. These utilities are implemented in Python & Scala and offer functions to get various details about UDP mappings.

Here's a breakdown of the functionalities offered by each UDP utility along with example usage:

getMappings(mappingsname)

  • Parameters:
    • mappingsname (String): The name of the UDP mapping you want to get details about.
  • Returns
    • An array of Column objects. Each Column object contains information about a column within the UDP mapping, including its name and source.
  • Example:
    • This code retrieves the details of all columns within the UDP mapping named "sparkprocess_test_Output1" and iterates through each column, printing its name and source.

      Python

       /***  
* @param mappingsname
* @return Array[Column]
*/

val columns = getMappings(mappingsname: String)

Example :
var columns = getMappings("sparkprocess_test_Output1")
for column in columns:
print("name : "+column.name+" source : "+column.source)

Scala

       /***  
* @param mappingsname
* @return Array[Column]
*/

val columns = getMappings(mappingsname: String)

Example :
var columns = getMappings("sparkprocess_test_Output1")

getMappingNames(mappingsname)

  • Parameters:

    • mappingsname (String): The name of the UDP mapping you want to get details about.
  • Returns:

    • An array of strings representing the names of all columns within the UDP mapping.
  • Example:

    • This code retrieves an array containing the names of all columns within the UDP mapping "sparkprocess_test_Output1".

      Python

       /***  
* @param mappingsname
* @return Array[String]
*/

val names = getMappingNames(mappingsname: String)

Example :
var names = getMappingNames("sparkprocess_test_Output1")

Scala

       /***  
* @param mappingsname
* @return Array[String]
*/

val names = getMappingNames(mappingsname: String)

example :

var names = getMappingNames("sparkprocess_test_Output1") 

getMappingSources(mappingsname)

  • Parameters:

    • mappingsname (String): The name of the UDP mapping you want to get details about.
  • Returns:

    • An array of strings representing the sources of all columns within the UDP mapping.
  • Example:

    • This code retrieves an array containing the source information for all columns within the UDP mapping "sparkprocess_test_Output1".  
      Python
       /***  
* @param mappingsname
* @return Array[String]
*/

val sources = getMappingSources(mappingsname: String)

Example:
var sources = getMappingSources("sparkprocess_test_Output1")

Scala

       /***  
* @param mappingsname
* @return Array[String]
*/

val sources = getMappingSources(mappingsname: String)

Example :
var sources = getMappingSources("sparkprocess_test_Output1")

getMappingIdentifiers(mappingsname)

  • Parameters:

    • mappingsname (String): The name of the UDP mapping you want to get details about.
  • Returns

    • An array of strings representing the identifiers of all columns within the UDP mapping.
  • Example:

    • This code retrieves an array containing the identifiers for all columns within the UDP mapping "sparkprocess_test_Output1".

      Python

       /***  
* @param mappingsname
* @return Array[String]
*/

val names = getMappingIdentifiers(mappingsname: String)

example :

var names = getMappingIdentifiers("sparkprocess_test_Output1")

Scala

       /***  
* @param mappingsname
* @return Array[String]
*/

val names = getMappingIdentifiers(mappingsname: String)

Example :
var names = getMappingIdentifiers("sparkprocess_test_Output1")

getMappingPartitions(mappingsname)

  • Parameters:

    • mappingsname (String): The name of the UDP mapping you want to get details about.
  • Returns:

    • An array of strings representing the partitions associated with the UDP mapping.
  • Example:

    • This code retrieves an array containing the partition information for the UDP mapping "sparkprocess_test_Output1".
      Python
       /***  
* @param mappingsname
* @return Array[String]
*/

val names = getMappingPartitions(mappingsname: String)

Example :

var names = getMappingPartitions("sparkprocess_test_Output1")

Scala

       /***  
* @param mappingsname
* @return Array[String]
*/

val names = getMappingPartitions(mappingsname: String)

Example :
var names = getMappingPartitions("sparkprocess_test_Output1")