JoinLayers
  • 1 Minute to read
  • Dark
    Light
  • PDF

JoinLayers

  • Dark
    Light
  • PDF

Article summary

General: JoinLayers

Join Analysis Functions

Purpose

Use these functions to:
  • Count the number of layers that matched for each record in a join
  • Find the first layer that matched for a record
  • Obtain the binary value of matching layers
  • Get a match score for each record

Return Value

PropertyValue
FieldTypeInteger
FieldSizeLow
DataTypeDiscrete
DataSizeShort / Integer / LongInteger / Double
Example Return Value: 


Parameters

ParameterJSONDescription
Table“targetTable”: “foreigntablename”Required.  The foreign table in the join.
Filter“dataset”: {DataSet_JSON}Optional.   If a filter is applied, records not in the filter recordset will be returned as null.
Function"function":"joinlayers""joinlayers"
Primary Table“p1”: “primarytablename”Required.  
The primary table in the join.
Function“p2”: "function"Required.  One of:
  • Count - Counts number of layers matched for each record.
  • First - Returns the first layer matched for each record.
  • Score - Total score, higher values for earlier (better) matches.
  • Raw - Binary value of matching layers (1st layer = bit 0)

JSON Sample

{
  "method": "BuildBakedField",
  "targetTable": "DATA_DS1",
  "overwrite": true,
  "name": "dj_JL_Count_DS1",
  "function": "joinlayers",
  "p1": "customers",
  "p2": "Count",
  "project": "SharedLibrary"
}


Usage Notes

First build the join, using AddJoin and AddJoinLayer.   Then create JoinLayer fields.

At least one join layer must be present for JoinLayer functions to be calculated.

See Also:   

Example

ExampleDetails
DescriptionCount join layers for each record in customer/transaction join
Input
  • Table: = "transactions"
  • Filter: = [No Filter]
  • Function: = "joinlayers"
  • p1:= "customers"
  • p2:= "count"
  • Name: = dj_JL_Count





Was this article helpful?