Skip to main content

NIM

Step 1: Add & configure a CSV source system (tutorial)

In this step, we'll add a CSV source system based on the HR500 dataset, and then configure its data model.

Add the CSV source system
  1. Go to Systems > Overview.

    2023-07-06_12-22-18.jpg
  2. Click Add.

  3. Select CSV-File for System Type.

  4. Enter a System Name.

    For this example, HR500.

    2023-07-06_12-23-03.jpg
  5. Click Save.

  6. The new system is added to the Configured Systems pane.

    2023-07-06_12-23-37.jpg
  7. Click configure_tables.pngConfigure.

  8. Select a Drive - share.

  9. In the Directories pane, navigate to the unzipped HR500 folder.

  10. In the Files pane, select the checkbox for each data file to import.

    For this example, we'll select all five files in the HR500 dataset.

    2023-07-06_12-24-50.jpg
  11. Click Save.

  12. Click Collect, to perform an initial data collection from this system.

    1. Expand this system's table list and go to one of the tables to confirm that data has been collected.

      2023-07-06_12-26-59.jpg
Assign primary keys

The next step is to assign primary keys to tables. Primary keys should be stable, non-mutable, uniquely identifying fields.

  1. Expand this system's table list and go to the contracts table. Then go to the Columns tab.

    2023-07-06_12-29-33.jpg
  2. Select the contract_id column as this table's Key and Display Name.

    2023-07-06_12-31-04.jpg

    Tip

    The Display Name optionally lets you select a column other than the Key to be displayed when records from this table are shown in NIM.

  3. Click Save.

  4. Repeat this process for the other data tables in this system. Set the primary keys and display names as follows:

    Table

    Key

    Display Name

    contracts

    contract_id

    contract_id

    departments

    organizational_unit

    organizational_unit

    employees

    employee_id

    employee_id

    employments

    employment_id

    employment_id

    job_titles

    job_code

    job_code

  5. Finally, collect this system's data again, by going to the Overview and clicking collect_tables.png Collect.

    2023-07-06_12-38-13.jpg
Set up intra-system relations

Now, we need to establish relations between tables within this system, based on the primary keys we specified.

Tip

Primary keys in NIM work slightly different than in relational databases. In the latter, keys merely act as constraints. However, in NIM keys are additionally used to relate tables to each other via intra-system relations, and these relations subsequently limit the joins you can do in filters.

  1. Expand this system's table list and go to the contracts table. Then go to the Relations tab.

    2023-07-06_12-40-36.jpg
  2. Click Determine Relations Automatically to have NIM automatically find matching FK-PK relations between this table and other tables in the same system.

    2023-07-06_12-41-24.jpg

    NIM automatically sets up the following relations:

    • Foreign key employment_id (N) → primary key employment_id of employments table (1)

    • Foreign key manager_id (N) → primary key employee_id of employees table (1)

    • Foreign key department (N) → primary key organizational_unit of departments table (1)

    • Foreign key job_code (N) → primary key job_code of job_titles table (1)

  3. Enable all the checkboxes in the N-N Relations pane.

    2023-07-06_12-42-56.jpg
  4. Click Save.

  5. Repeat this process for the other data tables in this system (none of the other tables have N-N relations).

    • departments table

      • Foreign key parent (N) → primary key organizational_unit of departments table (1)

      2023-07-06_12-44-46.jpg
    • employees table

      • None

      2023-07-06_12-45-23.jpg
    • employments table

      • Foreign key employee_id (N) → primary key employee_id of employees table (1)

      2023-07-06_12-46-04.jpg
    • job_titles table

      • None

      2023-07-06_12-46-34.jpg
  6. Collect this system's data once again, by going to the Overview and clicking collect_tables.png Collect.

We now have the following keys & relations configured:

HR500_erd.jpg

Note

If you want an ERD for your NIM tables, you'll need to draw one manually using an external tool. NIM does not currently auto-generate ERDs.

Next: Step 2: AD target system