C Function Using GLOP Data | UFC Code Examples | Teradata Vantage - C Function Using GLOP Data - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

This example shows how to create a GLOP set, add GLOP data to the GLOP set, create a UDF as a member of the GLOP set, and use the GLOP data from the UDF. Take the following steps to use this example:

  1. If the DBCExtension database does not exist, use the DIPGLOP script to create it.

    For information on the DIP utility and the DIPGLOP script, see Teradata Vantage™ - Database Utilities , B035-1102 .

  2. Use the CREATE GLOP SET statement to create a GLOP set called MyGlopTestSet.

    See SQL Statement to Create GLOP Set.

  3. Create a UDF called compinform that returns a BLOB that will be used as the GLOP data.

    See SQL Definition for the Function That Generates GLOP Data and C Function Definition That Generates GLOP Data.

  4. Call DBCExtension.GLOP_Add to add the GLOP data to the GLOP set.

    See Add Data to GLOP Set.

  5. Create a UDF called glop_map1 that is a member of the GLOP set and maps the GLOP set to use the data.

    See SQL Definition for the Function That Uses GLOP Data and C Function Definition That Uses GLOP Data.

  6. Call the glop_map1 UDF.

    See Example Query That Calls the UDF That Uses the GLOP Data.