Database Connections
When the source data for a dataset is a database, instead of the workspace embedding connection parameters, a new technology can be used.
NEW |
Database connections were implemented in FME Desktop in FME2015, but Server support is entirely new for 2016 |
What is a Database Connection?
Database connections are containers for a set of database connection parameters. These parameters include database server, port number, username, password, and others that vary according to the database type.
The two main advantages of database connections are:
- Connection parameters are no longer embedded in a workspace, meaning less of a security risk
- For example, your parameters would not be exposed to anyone who downloaded the workspace
- Connection parameters can be reused among multiple workspaces
- For example, two workspaces that use the same database can use the same connection
Database connections can be published with a workspace from FME Desktop, or they can be added directly within FME Server.
Creating a Database Connection
Creating a database connection often starts in FME Desktop. This workspace has a connection for a PostGIS database:
When the workspace is published to FME Server a new dialog asks the author whether to also publish the database connection:
When run on Server the database connection is now available as a parameter:
The workspace then runs to completion as normal.
Managing Database Connections
FME Server also has a section for managing database connections under Manage > Database Connections on the menubar. This page allows administrators to create new connections, copy existing connections, delete existing connections, or edit existing connections:
Using Database Connections
When a workspace is run, if it has a database Reader (for example) the end-user is prompted and can select the database connection to use (either one uploaded with the workspace or one defined separately in FME Server):
Sister Intuitive says... |
Welcome. I'm here as your guide for this chapter of the FME Server training.
With database connections a workspace can be tested in FME Desktop using the author's connection parameters, but then switched to a general account once published to Server; all in a way that is both easy and secure. |
Miss Vector says... |
If I create a database connection that has superuser permissions then it would bypass any permission checks the database would make for creating and dropping tables. So how do you think I might prevent a user misusing that capability?
1. Remove that user's permission to run that workspace on FME Server 2. Remove that user's permissions to access the entire repository that workspace resides in 3. Remove permission to access that particular database connection for that user's role 4. Remove from their role permission to manage database connections |