3 Creating Datasources and Database Collectors

By the end of this page you will be able to:

Create a new datasource

  1. From the model toolbar, drag a  Datasource onto the model.
  2. In the new datasource settings form that opens, enter the Name: CRM
  3. In the settings toolbar, click  Save.
  4. PhixFlow adds the new datasource to your model. In the model toolbar, click  Save.
  5. You will now add more settings to the datasource.
  6. In the Basic Settings section:
    • Enabled: tick
    • Database Driver: Select MariaDB
  7. The Datasource Instances section has its own toolbar. Click  Create New. PhixFlow opens the settings for a new datasource instance. Set:
    • Name: Default
    • Enabled: tick
    • Authorisation Type: Local
    • URL: jdbc:mariadb://localhost/CRM
    • Username: CRM
    • PasswordXBPOaU493wx3amNAGySU
    • Click  OK to finish and close the datasource instance settings.
  8. Back in the datasource settings, click  OK to finish and close.

Create a database collector from the datasource schema browser

  1. In your model, hover your mouse pointer over the  Datasource icon. In the popup toolbar, click   Table in Database
  2. In the list of tables that PhixFlow opens, scroll down to the SOURCE_CUSTOMER_PHONE_NUMBERS table name.
    1. To have a look at the data in this table, double-click its name.
    2. You can see there are columns for ##CUSTOMER_REF and ##PHONE_NUMBER.
    3. Close this data form
  3. Right-click SOURCE_CUSTOMER_PHONE_NUMBERS and in the popup menu, select Create a Collector. PhixFlow adds a new  Database Collector to your model, which reads data from the table SOURCE_CUSTOMER_PHONE_NUMBERS.
  4. Double-click on the new database collector to open its settings.
  5. In the Basic Settings section → Statement Expression field, you can see that PhixFlow has added a database query.
  6. Close the database collector settings.
  7. In the model, click  Save.

Create a table automatically from a database collector

  1. Hover your mouse pointer over the  Database Collector .
  2. In the popup toolbar, click  Create Table Using Attributes. PhixFlow adds the new table to your model.
  3. In the model window, click  Save.

Run analysis and view the table data

  1. To run analysis on your new table hover your mouse pointer over the new table, and in the popup toolbar, click  Run Analysis.
  2. To view the data you just loaded, hover over the table and click  Show view. In the drop-down list, select  Default View.