Versions Compared

Key

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

Insert excerpt
_Banners
_Banners
namescreen
nopaneltrue

It is often easier to have data available when creating a screen as it allow you to dynamically create many items on the screen and see how the screen will look when populated. For this reason we will import the data downloaded from the first chapter in this course.

There are many ways to import data, however covering each of these s beyond the scope of this course. For our example we will import our data into an ERD.

Create an ERD

  1. From the application home screen, click
    Insert excerpt
    _erd
    _erd
    nopaneltrue
    .
  2. The ERD selection screen opens.
  3. Click 
    Insert excerpt
    _add
    _add
    nopaneltrue
     and enter:
    1. Name, My Data
    2. Description, a description of what the ERD will be used for.
    3.  

Upload Data

  1. On your local machine open the folder containing all of the resource files downloaded and extracted in chapter 1.
  2. Drag each file, one at a time, onto your ERD diagram:
  3. The tables are created in PhixFlow and will be available to our screens when we create them.


Tip

If you have data in PhixFlow already, you can add tables to your ERD directly from the repository.

  1. To access your tables simply click the 
    Insert excerpt
    _tableOnly
    _tableOnly
    nopaneltrue
    .
  2. Locate your table.
  3. Drag it from the repository onto the ERD.
  4. If you do not have a primary key set it is strongly recommended you do so, see next section for details. Setting a Display Name is recommended but optional.

Set the Attributes

Now we will setup the following:

  • Primary Keys for each table so we can uniquely identify each record.
  • Display Names so we see the defined field instead of an ID. 
  • Relationships between tables so we an create relational views.
  • See Understanding ERDs for more information on these concepts.
  1. Companies Table
    1. Right-click on CompanyID, and select Make Primary Key.
    2. Right-click on CompanyName, and select Make Display Name.
  2. Employee Table
    1. Right-click on EmployeeID, and select Make Primary Key.
    2. Right-click on first_name, and select Make Display Name.
  3. ISO Country Codes Tables
    1. Right-click on CountryCode, and select Make Primary Key.
    2. Right-click on CountryName, and select Make Display Name.
  4. Orders Table
    1. Right-click on Order_ID, and select Make Primary Key.
  5. Order Lines Table
    1. Right-click on OrderLineID, and select Make Primary Key

At this point your ERD will look like this:

Image Removed

Set the Table Relationships 

The relationships allow us to associate the tables logically using keys. For example, the company MyBusiness Ltd has these Employees. We use primary and foreign keys to create the relationships.

  1. Companies to Employees
    1. On the Companies table, click and hold on the attribute CompanyID and drag it onto CompanyID on the Employee table. This is illustrated here:
      1.  
  2. Companies to ISOCountryCodes
    1. On the Companies table, click and hold on the attribute CountryCode and drag it onto CountryCode on the ISOCountryCode table.
  3. ISOCountryCode to Companies
    1. On the ISOCountryCodes table drag CountryCode onto CountryCode on the Companies table.
  4. Orders to OrderLines
    1. On the Orders table drag Order_ID onto OrderID on the OrderLines table.
    Once Complete

Checkpoint

At this point your diagram

will

should look like this:

  1. Image Modified

Adding Bends

  1. Add bends to your relationships by clicking and holding the relationship line and dragging it to the required location:
  2. Image Modified


Adding Data using an Analysis Model

If you have data that needs to be processed before it is ready to be displayed, for example it needs deduplicating or enriching, then you will need to import your data through an Analysis Model

Why we use analysis Models.

ERD vs Analysis Models. Once your data is in an Analysis Model you can enrich and process it. for more information on this topic see: