Importing Data From a Database
Overview
Importing data from a database requires three modelling objects:
- Datasource: Provides the connection to the database.
- Database Collector: retrieves data from the datasource using a SQL command.
- Table: The location in PhixFlow to hold the data.
Solution
1. Setting up the Datasource
- From the Create section of the toolbar click Database.
- Drag Datasource onto the canvas.
- In the properties window that opens on the right:
- Enter a Name.
- Select a Database Driver.
- Add a datasource instance:
- Enter a Name.
- Enter the URL for the database.
- Specify the Username and Password.
- Tick the Enabled check box when it is ready to use.
- Tick the Enabled check box when it is ready to use.
- We recommend you tick Protect during import to prevent this datasource being updated or deleted during import.
- Other settings are optional.
- Save Apply and Close your changes.
2. Database Collector
- Hover over the datasource and click Show Tables, all available tables will be listed.
- Right click on the desired table and click create a collector.
- A database collector is created and set to import all data.
- 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.
- Save Apply and Close your changes.
3. Table
- Hover over the Database Collector and click Create Table Using Attributes.
- A table now exists ready hold imported data in PhixFlow.
- To import the data hover over the table and click Run Analysis.
- To remove any imported data see Removing Recordsets.