Mashups in EMML : Writing Mashups in EMML : Declaring Data Sources
Declaring Data Sources
 
Named Datasources versus the Default Datasource
Explicitly Defining the Connection
Dynamic Connections
Working Samples
<datasource>
If your mashup script invokes SQL queries or statements directly, you typically refer to named datasources that have already been configured in the Presto Server called implicit datasources. If needed, you can explicitly declare a <datasource> with connection information for a database directly in the mashup script. You can use several named datasources in a mashup script as well as a single, explicitly declared, default datasource.
The advantages, disadvantages and configuration requirements for implicit and explicit datasources include:
Datasource
Advantages
Disadvantages
Configuration
Implicit
Configured in the Presto Server by Presto administrators.
Tip:  
It is a best practice to use implicit datasources.
*Single, consistent configuration.
*Easily managed in clustered environments.
*Credentials for database access are secure (encrypted in the Presto Repository).
*Supports 'hot' updates to drivers without restarting the Presto Server.
*Does not support dynamic connection information.
Connection and credential information is static in the Presto Repository.
See Manage Data Sources and Drivers for instructions on how to define datasources in the Presto Server.
Explicit
Declared in the mashup script using the <datasource> element.
*Can support dynamic connection information or credentials using Presto attributes or input parameters to the mashup script.
*Credentials and connection information is less secure, as clear text within the mashup script or defined as input parameters or Presto attributes.
*Configuration is in individual mashup scripts, and thus harder to manage and maintain consistency.
*If datasources are named, connection information must be consistent across all mashup scripts in the Presto Repository.
You must add and configure drivers in the Presto Server for explicit datasources. See Configuring Datasource Drivers for instructions.
Using implicit named datasources in EMML is a best practice. See also Named Datasources versus the Default Datasource for more information.
See Explicitly Defining the Connection and Dynamic Connections for instructions on declaring datasources explicitly. See Working Samples for information on mashup samples for datasources.
Copyright © 2006-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback