C Function Using GLOP Data | UFC Code Examples | Teradata Vantage - C Function Using GLOP Data - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
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.