Partitioning Input Data

Use the PARTITION BY clause to express and declare invocation partitioning in your parallel TPF.

As a SQL analyst, you can efficiently utilize system resources by leveraging the server query parallelism and distribution features available with the PARTITION BY clause in your SQL queries. Depending on the clause specified, the server may partition data into distinct value-based sets of rows or by row-range sets of rows.

You can express a design for partition via the PARTITION BY <expr> clause on the TABLE parameter to a TPF. UDF developers can utilize the table parameter metadata attribute EXTFNAPIV4_DESCRIBE_PARM_TABLE_PARTITIONBY to programmatically declare that the UDF requires partitioning before invocation can proceed. The UDF can inquire to the partition to enforce it, or to dynamically adapt the partitioning.

Related reference
Parallel TPF PARTITION BY Examples Using EXTFNAPIV4_DESCRIBE_PARM_TABLE_PARTITIONBY
EXTFNAPIV4_DESCRIBE_PARM_TABLE_PARTITIONBY (Get)
EXTFNAPIV4_DESCRIBE_PARM_TABLE_PARTITIONBY (Set)
V4 API describe_parameter and EXTFNAPIV4_DESCRIBE_PARM_TABLE_PARTITIONBY