Versions Compared

Key

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

Insert excerpt
_Banners
_Banners
nameadministration
nopaneltrue

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

Overview

The PhixFlow application communicates with:

  • the database on which it is installed.
  • can communicate with an external database from which it needs to load data.


    This is configured using a Datasource in an analysis model. 

    To communicate with a an external database, PhixFlow needs:

    1. The
    appropriate database driver
    1. jar files
    in its Driver Class
    1. for connecting to a database, stored in PhixFlow's Database Driver File Directory.

    1. This location is set directly in
    the PhixFlow database, and is displayed in 
    1. System Configuration → System Directories → Database Driver File Directory.
    2. A
    Driver Class for the database
    1. database driver configured in the repository. One database driver
    class
    1. item can
    have multiple Driver Class Files
    1. refer to multiple jar files.

    Preinstalled Databases

    There are three databases on which PhixFlow can be installed:

    MariaDB
    1. MySQL
    2. MS SQL Server
    3. Oracle.

    For each of these, PhixFlow is preconfigured with:

    • database driver jar files stored in in tomcat/webapps/phixflow/WEB-INF/lib 
    • a database driver classes that use the database driver in the repository, which uses jar files.
    PanelborderColor#7da054
    titleColorwhitetitleBGColor#7da054borderStylesolidtitleSections on this page

    Table of Contents
    indent12px
    stylenone

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

    You can use these

    driver classes

    pre-configured database drivers in a datasource. However, you cannot update their properties or see their

    driver class

    jar files.

    tip

    Additional Databases

    You

    can use the MariaDB driver class to connect to a MySQL database.You

    may need to configure additional database drivers to support:

    • other types of database
    • different versions a database.

    How to Configure a Database Driver

    Class

    1. Find out which JDBC database drivers you require. This information is available in the documentation for your database. Also check the System Requirements and Compatibility page for supported versions. Communication to a database may require multiple JDBC driver files. 
    2. Download the required JDBC driver files from:

    Save the files to the Driver Class File Directory. You need permission to add system files to do this.
    1. Ensure you have a Database Driver File Directory setup. If it has been
    set in the PhixFlow database, it will be listed in the System Configuration
    1. setup it can be seen in System Configuration → System Directories → Database Driver File Directory.
      1. If it has not been
    set:
    Insert excerpt_set_driver_dir_set_driver_dirnopaneltrue
  • In the PhixFlow application, for each type of database, create one Driver Class; see Adding or Changing a Driver Class, below.
  • In the driver class properties → Driver Class File section, add all the JDBC driver files that the database requires; see Driver Classes and Driver Class File Properties, below.
  • For each driver class file, specify the full path to the file, which is stored in the Driver Class File Directory, or a sub-directory of it.
  • Adding or Changing a Driver Class  Anchor_add_addTo create a driver class, in
      1. setup, create the directory in a location available to Tomcat.
      2. Open Administration → System Configuration → System Directories, and update the Database Driver File Directory with the path of the directory.
    1. In PhixFlow, for each type of database, create one database driver;
      1. In the full repository scroll down to the
        Insert excerpt
        _driver
    _class
      1. _repo
        _driver
    _class
      1. _repo
        nopaneltrue
         section. 
      2. To add a new driver,
    right-
      1. click
    Driver Classes and select 
      1. Insert excerpt
        _
    new
      1. addIcon
        _
    new
      1. addIcon
        nopaneltrue
        . PhixFlow opens a property tab where you can enter the details for the new driver.
        1. To open an existing database driver
    class
        1. , in the repository double-click on its name.
      1. In the database driver properties → Database Driver File section, add all the JDBC driver files that the database requires; see Properties Tab → Settings, below.
      2. For each jar file, specify the path to the file stored in the Database Driver File Directory.


    Tip

    You cannot change the pre-configured

    driver classes

    database drivers supplied with your PhixFlow installation. These have the System Defined property ticked.

    Driver Classes and Driver Class File Properties 

    PhixFlow also includes a number of unconfigured drivers, such as Google Big Query, which are included for backwards compactivity. See Deprecated Database Drivers below for full details. 

    Insert excerpt
    _property_tabs
    _property_tabs
    namebasic-h
    nopaneltrue
    Anchor
    properties
    properties

    The

    driver classes

    database drivers configured in the repository populate the drop-down list in

    Insert excerpt
    _datasource
    _datasource
    nopaneltrue
     properties Basic Settings

    → Driver Class.  Insert excerpt_standard_settings_standard_settingsnopaneltrue

    → Database Driver 

    Insert excerpt
    _parent
    _parent
    nopaneltrue
     This section is available for

    custom driver classes

    custom database drivers and shows the package to which a database driver

    class

    has been added, if any.

    Tip

    If you intend to use an analysis model in multiple PhixFlow instances, and the model contains a datasource that uses a custom

    driver class

    database drivers, remember to add the database driver

    class

    to the same application or package as the analysis model; see Using Drivers Across Multiple Instances

    ,

    below.

    Basic

    Insert excerpt
    _parent
    _parent
    nopaneltrue

    Settings

    Basic 

    FieldDescription

    Name

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

    Enter

    the

    the  database 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

    this  database drivers is custom defined for your PhixFlow instance. You can change it's configuration.

    Insert excerpt
    _check_box_tick
    _check_box_tick
    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.

    Advanced

    FieldDescription
    Datasource Profile

    Use this option to specify the datasource properties to use. Enter:

    • default - for most drivers
    •  
    tbc
    • bigQuery - for Google BigQuery.

    Database Driver

    Class

    File

    This section has a toolbar with standard buttons

    The grid lists the jar files for this database driver

    class

    Each database usually requires multiple jar files. To add a jar file to the list:

    1. Click
      Insert excerpt
      _new
      _new
      nopaneltrue
       to open a the properties for a new Database Driver
    Class
    1. File Location.
      (Database Driver
    Class
    1. File Location properties are only available from this grid. They are not listed in the repository.)
    2. In the Basic Settings section, set:

      FieldDescription

      Name

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

      The root Database Driver

    Class
    1. File Directory, must be specified in System Configuration

      Specify a path, relative to the root Database Driver

    Class
    1. File Directory:

      • either to a specific driver
    class
      • jar file
      • or to a sub-directory that contains
    multiple driver class
      • multiple driver jar files.

      For example:

      • if the file is /opt/phixflow-drivers/BigQueryJDBC/driverfile.jar
      • and the Database Driver
    Class
      • File Directory is set to /opt/phixflow-drivers/

      then enter:

      • for Linux: BigQueryJDBC/driverfile.jar
      • Windows:  BigQueryJDBC\driverfile.jar

      If you specify a sub-directory, all jar files will be loaded but further sub-directories will be ignored.


    1. Click 

      Insert excerpt
      _finish
      _finish
      nopaneltrue
       to save and close the properties and return to the database driver

    class
    1. properties.

    To remove a jar file from the grid, use the toolbar button 

    Insert excerpt
    _delete
    _delete
    nopaneltrue
    Anchor
    export
    export


    Insert excerpt
    _audit
    _audit
    nopaneltrue

    Using Drivers Across Multiple Instances

    If you run multiple instances of PhixFlow, you must ensure that:

    • a custom database driver
    class
    • used by a datasource, is moved with the datasource to another PhixFlow instance
    • AND the database driver
    class
    • has access to the database driver jar file from the other instance.

    This means all datasource objects continue to work in other instances. 

    Excerpt
    namePackageDependency


    Tip

    Packages cannot depend on objects in another package. For example, if a Datasource is in an application then its Database Driver can be in the application or any linked packages. However, if a Datasource is in a package then its Database Driver must be in the same package. Datasources in one package cannot reference Database Drivers in a different package. 

    The easiest way to ensure

    the driver class moves

    Database Drivers move with the

    datasource

    Datasource is to

    create a package that contains the model or application, and to add the driver class to it; see Package.You cannot move the

    add the database driver to the same application or package as the model.


    For adding database drivers to the same application or package as the model; see Package.

    Note

    The following system database drivers cannot be moved into a package because they are installed on all PhixFlow instances:

    • MariaDB/ MySQL
    • MS SQL Server
    • Oracle
    .This is because they are installed on all PhixFlow instances.

    How PhixFlow Decides Which Driver to Use

    PhixFlow is configured with a class path for finding drivers. This will use the first appropriate driver it finds in:

    1. The Connector Jar File Location configured for the
    driver classes
    1. database drivers file. 
    2. tomcat/webapps/phixflow/WEB-INF/lib
    3. tomcat/lib.
    Note

    We do not recommend using the tomcat/lib directory for driver files.

    Deprecated

    Driver ClassesThe

    Database Drivers

    For PhixFlow pre-version 10.1, the repository includes the following

    ,

    deprecated

    driver classes

    database drivers, for backwards compatibility. 

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

    These are drivers are read-only and do not connect to any database drivers. If you want to connect to one of these databases, we recommend you create a

    new

    new database driver

    class

    in which you can configure all the database drives needed.

    If you want to connect a

    preconfigured

    preconfigured database driver

    class

    to the appropriate JDBC database driver files, download and save them to tomcat/webapps/phixflow/WEB-INF/lib. Be aware that the deprecated

    driver classes

    database drivers will be removed in a future release.


    Live Search
    spaceKey@self
    additionalnone
    placeholderSearch all help pages
    typepage

    Panel
    borderColor#00374F
    titleColorwhite
    titleBGColor#00374F
    borderStylesolid
    titleSections on this page

    Table of Contents
    maxLevel3
    indent12px
    stylenone


    Learn More