Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Introduction
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 class.
- 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
your changes.Insert excerpt _finish _finish nopanel true
2. Database Collector
- Hover over the datasource and click
, all available tables will be listed.Insert excerpt _datasource_show_tables _datasource_show_tables nopanel true - 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 Properties.
- Save
your changes.Insert excerpt _finish _finish nopanel true
3. Table
- Hover over the Database Collector and click
.Insert excerpt _table_with_attributes _table_with_attributes nopanel true - A table now exists ready hold imported data in PhixFlow.
- To import the data hover over the table and click
.Insert excerpt _run_analysis _run_analysis nopanel true - To remove any imported data see Removing Recordsets.
- To import the data hover over the table and click