QQ - How do I create a join between a field that is continuous on one table and discrete on the other?
- 1 Minute to read
- Print
- DarkLight
- PDF
QQ - How do I create a join between a field that is continuous on one table and discrete on the other?
- 1 Minute to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
A: Use the flags option on function Concat to create a continuous keyfield
How do i create a join between the following tables?
Table1: BikeTripData
- 70,000,000 rows
- KeyField: Journey_ID
- Alphanumeric: S123E343
- Continuous | String
Table2: Journeys
- 100,000 rows
- KeyField: Journey_ID
- Alphanumeric: S123E343
- Discrete | String | Short | 933
Issues:
- Can't create link directly because we get "Continuous join fields must be same data type and field type. Cannot add join"
- Using MakeContinuousKey on Journeys.Journey_ID doesn't work, as this creates an integer
Resolution:
- Journey_ID is created using the Concat function. Use the flags option, and set to NOORD to create the field as a continuous field:
{
"method": "BuildBakedField",
"targetTable": "Journeys",
"overwrite": true,
"name": "Journey_ID",
"function": "string",
"p1": "CONCAT(A,B,C,D,E,F)",
"p2": "E_ID",
"p3": "S_ID",
"project": "JoinDiscreteContinuous",
"flags": "NOORD"
}
Was this article helpful?