Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

This page is for data modellers who want to connect to an external database, either to load data or to export processed data back to a database.

Overview

The datasource defines a connection to an external database. You need to define at least one of these datasource modelling object in order to push and pull data to and from external database systems.

...

. You can configure several datasource objects if you want to have several connections to the same database.

Datasource behaviour is also determined by these parameters set elsewhere in PhixFlow:

  • Privilege 'Allow anonymous updates on datasources'. Only a user with this privilege can modify the 'Anonymous export allowed' flag on a datasource.
  • System Configuration. parameter 'Allow anonymous export by default'. This causes the 'Anonymous export allowed' to be true by default on all new datasources.



To configure a datasource you must specify:

  • a name
  • a driver class. This should match the type of datasource you are connecting to, e.g. Oracle, MySQL, SQLServer etc.); see Driver Classes.
  • The protect during import flag can be used to prevent this datasource being updated or deleted during import. T
    To prevent orphaned datasources, when a parent application is deleted by the import, its datasources will also be deleted.
  • Remember to set the enabled flag to make the datasource active.
  • Most importantly, ensure you have configured at least one datasource instance.

The toolbar has the standard icons and 

Insert excerpt
_datasource_show_tables
_datasource_show_tables
nopaneltrue
, which opens a list of tables visible for this datasource using the default login details; see the Table Details window.

For information about other property tabs, see Property Tabs.

...

A datasource instance defines connection details to a database. A number of instances can be defined to allow for several connections under a single datasource. At least one datasource Instance must be defined for each datasource.

Basic Settings

FieldDescription
NameName of the datasource instance. Used to identify the datasource instance in collectors and exportersRequired. Enter the name for this datasource object. You will use this name to specify this datasource object in other collector and exporter objects.
Enabled

Insert excerpt
_check_box_ticked
_check_box_ticked
nopaneltrue
 when the configuration is complete and the datasource is ready to be used.

URLEnter the URL to connect to the datasource. See example connection strings below.
EnabledFlag whether this datasource is enabled or disabled.
Anonymous UsernameUsername for connecting to the datasource when the credentials of the PhixFlow user should not or cannot be used, for example in a scheduled task plan.; see Connection URLs below. what
Allow Anonymous Export

For datasources connected to an exporter being run by a task, such as a scheduled task.  The target database must permit anonymous updates.

Insert excerpt
_check_box_ticked
_check_box_ticked
nopaneltrue
 to allow an exporter to export data anonymously to a database using the datasource. The datasource uses the anonymous username and password configured ...?where.

The datasource can only use the logged in user's credentials (see Use user credentials below).

Use User Credentials on Export

For datasources connected to an exporter being run interactively, when a user clicks 

Insert excerpt
_run_analysis
_run_analysis
nopaneltrue
 directly or via an application action.

Insert excerpt
_check_box_ticked
_check_box_ticked
nopaneltrue
  to connect to the target database using the PhixFlow username and password of the current logged-in user.


Note
The target database must already have the same username and password with the required permissions. Contact the database administrator to do this. 


Protect during import
Insert excerpt
_check_box_ticked
_check_box_ticked
nopaneltrue
 to specify ??
Password

Password for connecting to the datasource with the Anonymous Username.

I've ticked Allow Anonymous, and Use User, but I'm not seeing any fields where I can specify which user credentials to use. This option has gone.

Driver Class

Select the driver class for the type of database to which the datasource object connects. 

Tip

Not all the driver classes listed are configured with the JDBC drivers; see Driver Classes.



Advanced

FieldDescription
Check QuerySee Advanced Configuration.
Datasource ProfileSee Advanced Configuration.
DescriptionA description of the datasource instance.

Connection URLs
Anchor
url
url

A datasource instance must have a name, a URL, and a username and password used to connect to the external datasource. The URL should be in one of the following formats:

Panel
bgColor#e6f0ff
titleBGColor#99c2ff
titleExample connection strings


Platform
Connection String

Oracle

jdbc:oracle:thin:@hostname:1521:phixflow

Oracle (> 12c with PDB containers)

jdbc:oracle:thin:@hostname:1521/phixflow

Sql Server

jdbc:sqlserver://hostname\myservice;databaseName=phixflow

MySQL

jdbc:mysql://hostname/phixflow

Big Queryjdbc:bigquery://@hostname:@port;ProjectId=@Project;

...


Authentication to the Target Database
Anchor
AdvancedConfiguration
AdvancedConfiguration

...

bgColor#e6f0ff
titleBGColor#99c2ff
titleExternal Credentials Settings

There are two flags on the details tab that determine what credential the datasource sends when connecting to the external source.

...


When the Use User Credentials on Export flag is ticked, the current logged in user's own PhixFlow username and password will be used to connect to the target database when an exporter is used interactively. Note that this means that the username/password must be set up on the target system by a Database Administrator.

Panel
bgColor#e6f0ff
titleBGColor#99c2ff
titleCheck Query

This is an advanced (optional) setting. Use this field when connections to the target database might go "stale", e.g. if the target database disconnects long running connections. Setting this field causes PhixFlow to run the query against the database just before each use of a "pooled" connection. If the query does not return a row, the connection is discarded and a new connection is created. To avoid any performance impact, the query should execute quickly. See also database collectors for guidance on writing SQL queries in PhixFlow.


Datasource behaviour is also determined by these parameters set elsewhere in PhixFlow:

  • Privilege 'Allow anonymous updates on datasources'. Only a user with this privilege can modify the 'Anonymous export allowed' flag on a datasource.
  • System Configuration. parameter 'Allow anonymous export by default'. This causes the 'Anonymous export allowed' to be true by default on all new datasources

    .

    Panel
    bgColor#e6f0ff
    titleBGColor#99c2ff
    titleDatasource Profile

    This is an advanced (optional) setting. Use this field when connections to the target database have certain requirements that are not covered by PhixFlow's default external Datasource configuration. The value entered in this field will determine which external datasource connection profile that this datasource instance will use to connect to the target database

    .
    Panel
    bgColor#e6f0ff
    titleBGColor#99c2ff
    titleGlobal Settings - For Administrators