Join Maps Dialog

Joining combines records from two or more tables using common attribute values, e.g., a common identifier. As a result, a combined table is produced that can be used for visualization, parameter assignment, etc.

The Join Maps dialog also provides the option to select specific records by using an SQL (often referred to as Structured Query Language) statement.

 

Join Maps can be applied in two different locations:

  • Directly on a map in the Maps panel. In this case, joining is done for the entire map, and the joined map is available for all operations, including visualization, parameter assignment, ... If multiple records are joined to each geometrical feature in the map, the memory demand may increase significantly.
  • Within the Parameter Association dialog. When joining here, the join will only be executed during parameter association, saving memory especially when joining multiple records to each map feature (e.g., joining time series to points).

Join

Before adding additional tables, the dialog displays the attributes of the current map in a box headed by the map name. Maps / tables to join can be added by clicking on Add Map. If more than one table is to be joined to the current map, multiple maps can be added at once. Additional maps are displayed in boxes headed by their names as well.

To join two maps, click on the attribute you would like to use for the join in the table you want to join ('right' table in SQL terminology). While pressing the left mouse button, drag a link to the corresponding attribute in the table to join to ('left' table, typically the original map).

If Keep matching records only is checked, the join operation is done as an inner join, i. e. only the records are kept for which the entries in the column used for joining match in both tables. Otherwise (Keep matching records only unchecked) a left outer join is carried out, i.e. all records of the table the link was drawn to are retained. In the latter case, records of the left map that do not match records in the right map will have empty (NULL) fields after the join.

As for parameter association purposes (opening this dialog from within the Parameter Association dialog) only inner join (Keep matching records only) is useful, this option is unchangeably set.

 

The order of joining (start and end point of the link) determines the 'left' and 'right' maps in SQL terminology and is significant if Keep matching records only is unchecked.

 

When using data from PostGIS or Oracle databases, the relationships defined for the table in the database (foreign key constraints) are available as default joining options via the context menu of the table header.

Select records

This input box can be used to select records based on their attributes. The syntax to be used is the one of the SQL SELECT [..] WHERE [...] clause.  The following operators may be used:

 

Operator Description
= Equal
<> Not equal
!= Not equal
< Less than
> Greater than
<= Less than or equal
>= Greater than or equal
AND Logical and
OR Logical or
BETWEEN ... AND ... Range of Data
IN (..., ..., ...) Part of a set
LIKE Search for a pattern
IS (NOT) NULL Missing / undefined data

 

Applying SQL statements to columns of text type, strings for comparison need to be put in quotation marks (single or double). Numerical values may be used without (SQL standard) or with quotation marks (single or double).

Examples

Slice > 5 AND Type = 'Well'

Keep all records with values > 5 in the Slice column and 'Well' in the Type column

X BETWEEN 3400000 AND 3500000

Keep all records with values between 3400000 and 3500000 in the X column

Name IN ('Obs_24', 'Obs_25', 'Obs_26')

Keep all records where the entry of the Name column matches either Obs_24, Obs_25 or Obs26

Name LIKE 'TW12%'

Keep all records where the entries in the Name column start with 'TW12'

 

Table of Contents

Index

Glossary

-Search-

Back