Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameanalysis
nopaneltrue

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:

  1. In your Introduction to Modelling analysis model, add a new database exporter

...

  1. by hovering over the

...

  1. table Customer Summary by Region, and press 

...

  1. Insert excerpt
    _database_exporter
    _database_exporter
    nopaneltrue
    .
  2. Give the new exporter the Name: Customer Summary By Region
  3. Press 

...

  1. Insert excerpt
    _finish
    _finish
    nopaneltrue
    .
  2. You will now see the new database exporter

...

  1. in the

...

  1. model.
  2. Save your model layout - click 
    Insert excerpt
    _save_saveModel
    _save_saveModel
    nopaneltrue
    .

To complete the configuration of the database exporter:

...

  1. Click the Database Exporter in your model and toggle the flag Enabled

...

  1. to
    Insert excerpt
    _toggle_on
    _toggle_on
    nopaneltrue
    .
  2. Set the Datasource to

...

  1. CRM.
  2. 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})


  3. Press 

...

  1. Insert excerpt
    _finish
    _finish
    nopaneltrue
    .

    Note that the pipe to the database exporter is dotted – this means that it is a Push pipe. When linking a

...

  1. 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

...

  1. table (otherwise, it has no data to process).

    To test the database exporter

...

  1. , Run Analysis on the table Customer Summary by Region.

  2. This is because the pipe you created to the database exporter is a push pipe, and so by running this

...

  1. table you will push data from the

...

  1. table to the exporter.

...

  1. Check the 
    Insert excerpt
    _administration
    _administration
    nopaneltrue
     →
    Insert excerpt
    _console
    _console
    nopaneltrue
     - Your job will be at the top of the list in the Completed Tasks section - to see messages, double click this.
  2. 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.
  3. Then press 
    Insert excerpt
    _close
    _close
    nopaneltrue
     on the System Console window.

Reviewing your exported data

You can review the data you have just exported using the PhixFlow schema browser:

...

  1. In your model, hover over the Customer Summary By Region 

    ...

    Insert excerpt
    _database_exporter
    _database_exporter
    nopaneltrue
    .
  2. In the pop up toolbar press 
    Insert excerpt
    _table_show_inputs
    _table_show_inputs
    nopaneltrue
    .
  3. The Datasource CRM will appear on your model view.
  4. Hover over the

...

  1. CRM 
    Insert excerpt
    _datasource
    _datasource
    nopaneltrue
     icon.
  2. In the

...

  1. popup press 

...

  1. Insert excerpt
    _datasource_show_tables
    _datasource_show_tables
    nopaneltrue
    .
  2. Find the table you exported

...

  1. to DEST_CUST_SUMM_BY_REGION
  2. Double-click on the table to bring up the table data - this is the data you just exported.
  3. In the model window, click 
    Insert excerpt
    _save_saveModel
    _save_saveModel
    nopaneltrue
    .