Importing Data From a Database

Overview

Importing data from a database requires three modelling objects:

  1. Datasource: Provides the connection to the database.
  2. Database Collector: retrieves data from the datasource using a SQL command.
  3. Table: The location in PhixFlow to hold the data.

Solution

1.Ā Setting up the Datasource

  1. From the Create section of the toolbar click Database.
  2. Drag Datasource onto the canvas.
  3. In the properties window that opens on the right:
    1. Enter aĀ Name.
    2. Select aĀ Database Driver.
    3. Add aĀ datasource instance:
      1. Enter aĀ Name.
      2. Enter theĀ URLĀ for the database.
      3. Specify theĀ UsernameĀ andĀ Password.
      4. Tick theĀ EnabledĀ check box when it is ready to use.
    4. Tick theĀ EnabledĀ check box when it is ready to use.
    5. We recommend you tickĀ Protect during importĀ toĀ prevent this datasource being updated or deleted during import.
    6. Other settings are optional.
    7. SaveĀ  Apply and CloseĀ your changes.

2. Database Collector

  1. Hover over the datasource and click Ā Show Tables, all available tables will be listed.
  2. Right click on the desired table and click create a collector.
  3. A database collector is created and set to import all data.
    1. If you wish to edit what data is retrieved, edit the Statement Expression in the properties window open on the right. For more information on editing the Statement Expression seeĀ Database Collector.
    2. SaveĀ  Apply and CloseĀ your changes.

3. Table

  1. Hover over the Database Collector and clickĀ  Create Table Using Attributes.
  2. A table now exists ready hold imported data in PhixFlow.
    1. To import the data hover over the table and clickĀ  Run Analysis.
    2. To remove any imported data seeĀ Removing Recordsets.