Versions Compared

Key

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

This page is for administrators who need to connect PhixFlow to external databases using Driver Classes.

Overview

In PhixFlow analysis models, you can use a Datasource to connect to an external database, and then load data from it. 

PhixFlow requires access to the database driver jar files in order to communicate with a database. Use the driver class properties to configure with the details of the database, its driver and the location of the jar filesThe PhixFlow application uses database driver jar files to communicate with:

  • the database on which it is installed.
  • an external database from which it needs to load data.
    This is configured using a Datasource in an analysis model.

To configure PhixFlow to communicate with a database, you must:

  1. Download the appropriate database driver jar files and save them to the Driver Class File Directory. This location is set in System Configuration
  2. Configure a Driver Class in the repository. One driver class can have multiple Driver Class Files.

PhixFlow is installed with a set of the database driver jar files and their associated  Insert excerpt_driver_class_repo_driver_class_reponopaneltrue in the full repository. You can use these driver classes in a datasource. However, you cannot update or change the pre-configured driver classes, which are:

...

(stored where) and preconfigured driver classes for the three databases on which it can be installed:

  • MariaDB
  • Microsoft (MS) SQL Server
  • MySQL
  • Netezza
  • Oracle
  • Sun ODBC Bridge
  • Teradata

...

...

PhixFlow automatically uses the appropriate driver class to communicate with its own database.

...

You may need to configure additional database drivers to support:

  • other types of database
  • different versions a database.

...

How to Configure Driver Classes

  1. Find out which (usually JDBC)  database drivers you require

...

  1. . This information is available in the documentation for your database. Also check

...

  1. the System Requirements and Compatibility page. Communication to a database may require multiple JDBC driver files. 
  2. Download the required JDBC driver files from:

...

  1. An administrator with
  2. Save them to the directory that is set as the System Configuration → Driver Class File Directory. You need permission to add system files must download the required JDBC drivers and save them to the system.
    To avoid your drivers being overwritten during Tomcat or PhixFlow upgrades, we recommend that you save them in a different part of your file system. 
  3. The PhixFlow administrator configures a driver class for the JDBC drivers by adding to the repository Driver Classes, specifying the database driver name and its path.

...

  1. to do this. 
  2. For each database, create one Driver Class, see  Adding or Changing a Driver Class, below.
  3. In the driver class properties, → Driver Class File section, add all the JDBC driver files that the database requires.
  4. For each JDBC driver file specify its name. If it is saved to a sub-directory of the Driver Class File Directory, specify it's relative path.

If you want to connect to any other database,

go get the database drivers  

save them into the PhixFlow directory System Configuration / Driver Class File Directory

set up your own driver class/ driver class file(s) to point to the driver classes

There are a set of driver classes in the repository.

They are deprecated. Don’t use them.

They are not linked to any database driver jar files.


To configure communication with a database, you need:

  1. the appropriate database driver jar files saved to a location outside the tomcat directory.
  2. A Driver Class and Driver Class File set up in PhixFlow. Together these specify the location of the driver jar files
  3. we recommend that they stop using these driver entries and instead that they set up user-defined drivers
  4. in the short term they may install the driver files into $tomcat/lib, but they should be aware that we will remove the ability to do this in a future release


PhixFlow requires access to the database driver jar files in order to communicate with a database. Use the driver class properties to configure with the details of the database, its driver and the location of the jar files.

PhixFlow is preconfigured with installed with the driver jar files and their associated 

Insert excerpt
_driver_class_repo
_driver_class_repo
nopaneltrue
 in the full repository

  • MariaDB
  • Microsoft (MS) SQL Server
  • Oracle

PhixFlow uses the appropriate driver class to communicate with its own database.

. You can use these driver classes in a datasource. However, you cannot update or change the pre-configured driver classes, which are:

mariadb is functionally equivalent to mysql, and that in general you can use the  mariadb driver to connect to a mysql database.


Deprecated Driver Classes

Present for backwards compatibility. We recommend you do not use the following preconfigured driver classes

  • DB2
  • Debug JDBC
  • Google Big Query
  • Hadoop Hive
  • MySQL
  • Netezza
  • Sun ODBC Bridge
  • Teradata

Adding or Changing a Driver Class 
Anchor
_add
_add

To create a driver class, in the full repository scroll down to the

Insert excerpt
_driver_class_repo
_driver_class_repo
nopaneltrue
 section. 

To add a new driver, right-click Driver Classes and select 

Insert excerpt
_add
_add
nopaneltrue
. PhixFlow opens a property tab where you can enter the details for the new driver.

...

Driver Classes and Driver Class File Properties

We should point out that The Driver Class (File) GUI lets the user define the driver class, but not to upload the jar files using the GUI – you have to create the containing directories and install the jar files directly on the server.

The driver classes configured in the repository populate the drop-down list in

Insert excerpt
_datasource
_datasource
nopaneltrue
 properties Basic Settings → Driver Class

...

FieldDescription

Name

Enter a unique name for the driver, which will appear in the PhixFlow repository.
Driver Class Name

Enter the driver class name, which you will find in the driver documentation. For example, for MySQL, the driver name is: com.mysql.jdbc.Driver

System Defined

Read-only.

Insert excerpt
_check_box_untick
_check_box_untick
nopaneltrue
 indicates this driver class is custom defined for your PhixFlow instance.

Insert excerpt
_check_box_ticked
_check_box_ticked
nopaneltrue
 indicates this driver is preconfigured when PhixFlow is installed. It is required for the system and cannot be updated.

DescriptionOptionally enter a description for the driver.

Driver Class File

This section has a toolbar with standard buttons.

The grid contains a list of jar files and their file path.  To add a jar file to the list:

  1. Click
    Insert excerpt
    _add
    _add
    nopaneltrue
     to open a the properties for a new Driver Class File Location.
  2. In the Basic Settings section, set:

    FieldDescription

    Name

    Enter a unique name for the driver.  
    Connector Jar File Location

    Enter the full path to the jar file.

    Windows example path

    Linux example path /lib/something/jar 

    PhixFlow looks for jar files in the root Driver Class File Directory, that is specified in System Configuration. If this jar file is in the root directory, leave this empty. If the jar file is in a subdirectory, specify the relative path.


  3. Click 

    Insert excerpt
    _finish
    _finish
    nopaneltrue
     to save and close the properties for the driver class file.


...

How PhixFlow Decides Which Driver to Use

(Needed??) PhixFlow is configured with a class path for finding drivers. This will use the first appropriate driver it finds in the following locations:

  1. The driver classes you configure In PhixFlow.
  2. The system driver classes.
  3. Database drivers in the Tomcat class directory.
  4. Database drivers in the Tomcat lib directoryConnector Jar File Location configured in the driver classes file. 
  5. tomcat/webapps/phixflow/WEB-INF/lib
  6. tomcat/lib.
Note

In PhixFlow version 8.2 it is possible to use tomcat/lib as the System Configuration → Driver Class File Directory. However this is deprecated. In a future release, we will remove the ability to use the tomcat/lib directory for driver files.