Import Data

When you have a lot of external data to input at once, it might be easier to organise it in a spreadsheet or use a script. In those cases, you can import the resulting CSV or JSON directly into FrontierNav.

Importing a CSV that creates new rows for any unmatched names. (Old interface)

Prepare an import

Before trying to import anything, use Edit Data Tables to make sure you have created all the Entity Types and Properties that you plan to import.

You might want to Save Changes in case your import doesn't go to plan or you can Rewind Changes.

Supported File Formats

CSV

CSVs are a file format that most spreadsheet software can export to so check your "Save As..." or "Export" options and choose "CSV". You MUST have column headings.

Name,Price
Potion,20
Sword,500

JSON

If you're using scripts, you can export to an array of JSON objects.

[
  {
    "name": "Potion",
    "price": 20 
  },
  {
    "name": "Sword",
    "price": 500
  }
]

Prepare relationship data

Often a single spreadsheet column can have multiple values. For example:

Enemy
Item Drops

Enemy 1

Potion, Sword

Enemy 2

Potion, Antidote, Sword

It's best to split these spreadsheet columns up before importing them. So you can have "Item Drop 1", "Item Drop 2", "Item Drop 3".

Enemy
Item Drop 1
Item Drop 2
Item Drop 3

Enemy 1

Potion

Sword

Enemy 2

Potion

Antidote

Sword

You can then apply multiple Relationship setters to combine them under a single Relationship property. Columns with no value will be safely ignored. If you do not want to do this manually, you can use a spreadsheet formula like SPLIT(B2, ", ").

Start an import

To start an import:

  1. Go to the table you want to import data to.

  2. Click the triple dot dropdown menu on the top right and choose "Import data".

  3. Choose a file and you will be presented with a form.

The default import form

This form may look complicated at first glance. Essentially the import process will:

  1. Go through each row of your data sequentially.

  2. Match each row to an Entity.

  3. Set properties on the matched Entity from the given columns.

First select the Entity Type to import into. After that, select the criteria to match an Entity to a row in your file. Finally, set the matched Entity's properties to columns in that row.

Once you are ready, press the "Import" button. Once you are happy with the import, remember to Open a change request.

Create or ignore unmatched entities

If a row does not match any entity, by default it will be ignored. You can choose to create an Entity instead. However, if doing so, you need to set a unique Name property. The import will fail if there is no Name.

Create or ignore unmatched relationships

If you are setting Relationships to an Entity and it does not match an existing Relationship, by default it will be ignored. You can choose to create a new Relationship instead.

Unlike entities, you do not need a Name to create a Relationship, but a target Entity must match. If you want to create the target Entity too, you must match a unique Name otherwise it will be ignored.

Existing relationships are not removed by default. You can choose to replace all existing relationships with the new relationship.

Handle errors

If a row fails to import, an error will be shown and the import will immediately stop. No changes from the import will be applied.

Last updated

Was this helpful?