Skip to main content

Celonis Product Documentation

BIND
Description

BIND pulls a column or constant to a specified table. In case of a column, this requires that the owner table of the column and the specified target table have a direct or indirect 1:N relationship.

Syntax
 BIND( target_table, value)
  • target_table: The target table which the value should be pulled up to.

  • value: A column or constant that should be pulled to the target_table.

Usage in PU-functions

BIND introduces the join between the specified source table column and the target table. This can be helpful in PU-functions, for example, where it enables to aggregate from the source table column to the target table in a 1:N:1 relationship:

bind.png

In order to aggregate from the source table to the target table, we first need to bind the source table column to the intermediate table using BIND. The resulting column can then be aggregated to the target table using a PU-function.

If the target_table is the owner of column, column is returned unmodified.

Examples

[1]

1:n relationship between caseTable and OrderPos, 1:n relationship between productTable and OrderPos. We want to find the price of the most expensive product in an order (case). PU_MAX cannot pull directly from the productTable to the caseTable, so we use BIND to pull the price column to the OrderPos table.

Query

Column1

         "caseTable"."caseName"
        

Column2

         PU_MAX ( "caseTable" , BIND ( "OrderPos" , "productTable"."price" ) )
        

Input

Output

OrderPos

caseId : int

productID : int

1

1

1

2

2

2

2

3

3

1

caseTable

caseId : int

caseName : string

1

'Case 1'

2

'Case 2'

3

'Case 3'

productTable

productID : int

productName : string

price : float

1

'Product A'

4.0

2

'Product B'

7.0

3

'Product C'

20.0

Foreign Keys

OrderPos.productID

productTable.productID

caseTable.caseId

OrderPos.caseId

Result

Column1 : string

Column2 : float

'Case 1'

7.0

'Case 2'

20.0

'Case 3'

4.0

[2]

Pull up a constant to a table.

Query

Column1

         BIND ( "caseTable" , 'c' )
        

Input

Output

OrderPos

caseId : int

productID : int

1

1

1

2

2

2

2

3

3

1

caseTable

caseId : int

caseName : string

1

'Case 1'

2

'Case 2'

3

'Case 3'

productTable

productID : int

productName : string

price : float

1

'Product A'

4.0

2

'Product B'

7.0

3

'Product C'

20.0

Foreign Keys

OrderPos.productID

productTable.productID

caseTable.caseId

OrderPos.caseId

Result

Column1

c

c

c

See also: