DSQL element path
Looping context
FROM departments
UNNEST items
Absolute path
Relative path
- salesperson_id for plusstore.departments.salesperson_id
- location for plusstore.location
- description for plusstore.departments.items.description
An element cannot be referenced with a relative path if the path can be ambiguous. In the example above, the input structure contains multiple elements named name under different loops. If the looping context is the input items element, only the name element under items can be referenced with the relative path name. The other name elements must be referenced with their absolute path, plusstore.departments.name for example.
If the looping context changes, some relative paths may be automatically changed to absolute paths if needed. If the looping context in the example above is originally the plusstore.departments loop, you can refer to plusstore.departments.name in the output department_name element with the relative path name. If you then change the looping context to the plusstore.departments.items loop, the relative path name can only refer to plusstore.departments.items.name and the expression in the output department_name element is updated to the absolute path plusstore.departments.name.
For an example of looping contexts and relative paths, see Mapping nested loops in a DSQL map.