AddJoin
  • 1 Minute to read
  • Dark
    Light
  • PDF

AddJoin

  • Dark
    Light
  • PDF

Article summary

Creates a join between two tables.

Notes - tables must be joined to copy fields, calculate aggregates and perform cross-table data set manipulation.   Tables can only be joined on one key at a time, although some engineering methods allow an explicit alternative join to be specified. 

For more information on joins, see Joins

To build multi-layer joins, see AddJoinLayer.

KeyValue(s)Description
method"AddJoin"
project"Name of Project"
primaryTable"TableName"Name of Table on the ONE side of a ONE to MANY Join
primaryField"ShortFieldName"Name of Key Field on the ONE side of a ONE to MANY Join
foreignTable"TableName"Name of Table on the MANY side of a ONE to MANY Join
foreignField"ShortFieldName"Name of Key Field on the MANY side of a ONE to MANY Joina
fdataset{}"ForeignTableDataSet"Added v5.9.16
Optional.
Foreign Table dataset.   Join will be built from records in the dataset.


{
  "method": "AddJoin",
  "primaryTable": "coupon response",
  "primaryField": "Transaction ID",
  "foreignTable": "Sales",
  "foreignField": "Transaction ID",
  "project": "BulkDecode"
}


The following builds a join using a filtered dataset on the foreign table:

{
  "method": "AddJoin",
  "primaryTable": "BikePoints",
  "primaryField": "commonName_short",
  "foreignTable": "BikeTripData",
  "foreignField": "EndStation_short",
  "project": "BikeData2",
  "fDataSet": {
    "logic": "or",
    "name": "DataSet",
    "strict": true,
    "set": [
      {
        "logic": "and",
        "stype": "FIELD",
        "entity": {
          "type": "field",
          "name": "BikeTripData.Duration",
          "table": "BikeTripData",
          "valueFilter": []
        },
        "op": ">",
        "values": [
          "0"
        ]
      }
    ]
  }
}

Was this article helpful?

What's Next