By the end of this page you will be able to:
Table of Contents |
---|
maxLevel | 1 |
---|
exclude | Run analysis* |
---|
|
Create a new datasource
From the model toolbar, drag You will now add a new datasource to your Introduction to Modelling analysis model to connect to an external database.
Hover your mouse over Insert excerpt |
---|
| _database |
---|
| _database |
---|
nopanel | true |
---|
|
s in the toolbar to show the list of options
Drag a
Insert excerpt |
---|
| _datasource |
---|
| _datasource |
---|
nopanel | true |
---|
|
onto the model. Expand |
---|
|
- You may need to press
Insert excerpt |
---|
| _more_options |
---|
| _more_options |
---|
nopanel | true |
---|
| , next to Insert excerpt |
---|
| _database_collector |
---|
| _database_collector |
---|
nopanel | true |
---|
| in the toolbar, to show the Insert excerpt |
---|
| _datasource |
---|
| _datasource |
---|
nopanel | true |
---|
| option.
|
- In the new datasource settings form that opens, enter the Name:
CRM
- In the settings toolbar, click .
- PhixFlow adds the new datasource to your model. In the model toolbar, click
Insert excerpt |
---|
| _save_saveModel |
---|
| _save_saveModel |
---|
nopanel | true |
---|
|
. - You will now add more settings to the datasource.
- In the Basic Settings section:
- Enabled: ticktoggle on (green)
- Database Driver: Select
MariaDB
- The Datasource Instances section has its own toolbar. Click
Insert excerpt |
---|
| _newaddIcon |
---|
| _newaddIcon |
---|
nopanel | true |
---|
|
Insert. PhixFlow opens the settings for a new datasource instance. Set:
- Name:
Default
- Enabled: ticktoggle on
- Authorisation Type: Local
- URL:
jdbc:mariadb://localhost/CRM
- Username:
CRM
- Password: XBPOaU493wx3amNAGySU
- Click
Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
|
to finish and close the datasource instance settings.
- Back in the datasource settings, click
Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
|
to finish and close.
Create a database collector from the datasource schema browser
- In your model, hover your mouse pointer over the
Insert excerpt |
---|
| _datasource |
---|
| _datasource |
---|
nopanel | true |
---|
|
icon. In the popup toolbar, click Insert excerpt |
---|
| _table_database |
---|
| _table_database |
---|
nopanel | true |
---|
|
- In the list of tables that PhixFlow opens, scroll down to the
SOURCE_CUSTOMER_PHONE_NUMBERS
table name.- To have a look at the data in this table, double-click its name.
- You can see there are columns for ##CUSTOMER_REF and ##PHONE_NUMBER.
- Close this data form
- Right-click
SOURCE_CUSTOMER_PHONE_NUMBERS
and in the popup menu, select Create a Collector. PhixFlow adds a new Insert excerpt |
---|
| _database_collector |
---|
| _database_collector |
---|
nopanel | true |
---|
|
to your model, which reads data from the table SOURCE_CUSTOMER_PHONE_NUMBERS. - Double-click on the new database collector to open its settings.
- In the Basic Settings section → Statement Expression field, you can see that PhixFlow has added a database query.
- Close the database collector settings.
- In the model, click
Insert excerpt |
---|
| _save_saveModel |
---|
| _save_saveModel |
---|
nopanel | true |
---|
|
.
Create a table automatically from a database collector
- Hover your mouse pointer over the
Insert excerpt |
---|
| _database_collector |
---|
| _database_collector |
---|
nopanel | true |
---|
|
you just created. - In the popup toolbar, click
Insert excerpt |
---|
| _table_with_attributes |
---|
| _table_with_attributes |
---|
nopanel | true |
---|
|
. PhixFlow adds the new table to your model. - In the model window, click
Insert excerpt |
---|
| _save_saveModel |
---|
| _save_saveModel |
---|
nopanel | true |
---|
|
.
Run analysis and view the table data
- Hover your mouse pointer over your new new table, and in the popup toolbar click
Insert excerpt |
---|
| _run_analysis |
---|
| _run_analysis |
---|
nopanel | true |
---|
|
. - To view the data you just loaded, hover over the table and click
Insert excerpt |
---|
| _view_show |
---|
| _view_show |
---|
nopanel | true |
---|
|
. In the drop-down list, select Insert excerpt |
---|
| _view_default |
---|
| _view_default |
---|
nopanel | true |
---|
|
. - In the model window, click
Insert excerpt |
---|
| _save_saveModel |
---|
| _save_saveModel |
---|
nopanel | true |
---|
|
.