What are Locations?
A location is a logical mapping of a database and a schema.
Every Tx Project requires a default location. This default location cannot be deleted, although additional locations can be added.
Locations are global to the project, shared among project users.
The location mapping is personal to each specific user, but the list of locations is set for the entire project.
Benefits of Locations
Consistent Object Management: Every Transformational (Tx) Object must have a location to be identifiable within the database.
Ease of Movement: Tx Objects linked to a location can be moved across environments without renaming the location. Environments is a feature that is coming soon.
Environment Settings: Different environment settings are contained within storage locations, allowing mapping changes from one database location to another without altering the project structure. Environments is a feature that is coming soon.
Setting Up a Storage Location
Initial Setup
When configuring the User Connection and linking it to a Transformational project, a Default Location called "My Location" is automatically created.
Modifying Existing Locations
- Click on the blue SqlDBM menu at the top left of the screen.
- Select "Settings and Conventions".
- Next, select "Storage Locations".
- A list of available Storage Locations will be shown.
- Here, the Name, Database, and Schema can be modified.
- Alternatively, new Locations can be configured.
Default Location
- The default location can be changed if multiple locations are available.
- There must always be at least one location designated as default.
Working with Locations in Jinja
Locations are saved as part of projects and environments. Locations and their attributes (e.g., name, database, schema) can be referenced from within a Tx Object through Jinja. The following attributes can be referenced:
name - the name of the location defined for a given Tx Object
databaseName - the database mapping defined for this Object's Location
schemaName - the schema mapping defined for this Object's Location
mapping - a concatenation (though a period["."]) of the database and schema. Equivalent to
{{ location.databaseName }}.{{ location.schemaName }}
Jinja examples
The following examples reference a Tx Object called MyObject
which uses a location SRC
, mapped to database dev
and schema raw
.
The following Jinja snippet:
{{location.name}}
{{location.databaseName}}
{{location.schemaName}}
{{location.mapping}}
{{name}} /* object name */
{{ location.databaseName }}.{{ location.schemaName }}.{{name}}
{{this}} /* don't forget about this */
Compiles to:
SRC
dev
raw
dev.raw
MyObject /* object name */
dev.raw.myObject
dev.raw.myObject /* don't forget about this */
See also: