Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
By the end of this chapter you will be able to:
- Set up a
...
- database exporter
In this exercise you will create an export of the customer summary report, to a database table:
- In your Introduction to Modelling analysis model, add a new
...
- database exporter by hovering over the
...
- table Customer Summary by Region, and
...
- press
.Insert excerpt _database_exporter _database_exporter nopanel true - Give the new exporter the Name:
Customer Summary By Region
- Press
...
.Insert excerpt _finish _finish nopanel true - You will now see the new
...
- database exporter in the model.
- Save your model layout - click
.Insert excerpt _save_saveModel _save_saveModel nopanel true
To complete the configuration of the
...
database exporter:
...
- Click the
...
- Database Exporter
...
- in your model
...
- Tick the flag Enabled
- Select the Datasource Rating and Billing
...
- and toggle the flag Enabled to
.Insert excerpt _toggle_on _toggle_on nopanel true - Set the Datasource to CRM.
In the Statement Expression field, enter the query:
Code Block insert into DEST_CUST_SUMM_BY_REGION (REGION, TOTAL_LAST_BILL_AMT, AVG_LAST_BILL_AMT) Values ({Region}, {TotalLastBillAmount}, {AvgLastBillAmount})
Press
...
.Insert excerpt _finish _finish nopanel true Note that the pipe to the
...
database exporter is dotted – this means that it is a Push pipe. When linking a
...
table to a
...
database exporter you must always use a
...
push pipe. This is because you cannot run a
...
database exporter on its own; it must always be driven from a
...
table (otherwise, it has no data to process).
To test the
...
database exporter, Run Analysis on the table Customer Summary by Region
.
- This is because the pipe you created to the
...
- database exporter is a
...
- push pipe, and so by running this
...
- table you will push data from the
...
- table to the exporter.
...
- Check the
→Insert excerpt _administration _administration nopanel true
- Your job will be at the top of the list in the Completed Tasks section - to see messages, double click this.Insert excerpt _console _console nopanel true - Check the log messages
...
- for this job – in particular scroll to the end; you should see messages telling you that data has been exported by your
...
...
- database exporter.
- Then press
on the System Console window.Insert excerpt _close _close nopanel true
Reviewing your exported data
You can review the data you have just exported using the PhixFlow schema browser:
...
- In your model, hover over the Customer Summary By Region
...
.Insert excerpt _database_exporter _database_exporter nopanel true - In the pop up toolbar press
.Insert excerpt _table_show_inputs _table_show_inputs nopanel true - The Datasource CRM will appear on your model view.
- Hover over the
...
- CRM
iconInsert excerpt _datasource _datasource nopanel true .
- In the
...
- popup press
...
.Insert excerpt _datasource_show_tables _datasource_show_tables nopanel true - Find the table you exported
...
- to DEST_CUST_SUMM_BY_REGION
- Double-click on the table to bring up the table data - this is the data you just exported.
- In the model window, click
.Insert excerpt _save_saveModel _save_saveModel nopanel true