JOINing Two or More Tables

DDS has the ability to join two or more tables. This is done using the JOIN element in the Query Builder Tab under the Designer section.

Use the check box to enable table joins. Once enabled, click inside the visible text field to view a list of tables. Select one or more tables as required.

Note:

The row filter must be added to this, which can either be done by using the Row Filter in the UI or adding your own rowFilter by typing the required conditions in the GET query box. You must also ensure that all required columns are selected in the column filter, otherwise an error will display when you try to run the query.

Join Tables

A sample GET query with result is as follows:

http://<dds_host>:<dds_port>/dynamic-data-service-web/resources/dds/<SELECTED_TABLE>/data?fromTables=TABLE1 t0,TABLE2 t1,TABLE3 t2&columnFilter=t0.COLUMN1,t1.COLUMN1,t2.COLUMN1,t0.COLUMN2,t1.COLUMN2,t2.COLUMN2,t0.COLUMN3,t1.COLUMN3,t2.COLUMN3&rowFilter=t0.COLUMN1=t1.COLUMN1 and t1.COLUMN1=t2.COLUMN1 and t1.COLUMN2=t2.COLUMN3 and t1.COLUMN3 LIKE '1'&offset=0&pageLimit=25

A curl equivalent of the above example:

Curl -i -H "Authorization: Bearer $AccessToken" -H "Content-Type: application/json;charset=UTF-8" --request GET  "http://<dds_host>:<dds_port>/dynamic-data-service-web/resources/dds/<SELECTED_TABLE>/data?fromTables=TABLE1%20t0,TABLE2%20t1,TABLE3%20t2&columnFilter=t0.COLUMN1,t1.COLUMN1,t2.COLUMN1,t0.COLUMN2,t1.COLUMN2,t2.COLUMN2,t0.COLUMN3,t1.COLUMN3,t2.COLUMN3&rowFilter=t0.COLUMN1=t1.COLUMN1%20and%20t1.COLUMN1=t2.COLUMN1%20and%20t1.COLUMN2=t2.COLUMN3%20and%20t1.COLUMN3%20LIKE%20'1'&offset=0&pageLimit=25" -o filename.txt