Importing

Introduction

Importing data can be very handy to fill your table, instead of manually creating entry by entry. You can import from various sources and you can even import relations, translatable fields and assets.

In the Imports tab of a table, you will see all imports that have run for this table. You can click on an import to open it and run the same import again.

Import Sources

First, you must upload or connect your data. You can choose from various sources.

File

For files that you upload from your computer, we support 3 types:

CSV

You can upload any CSV file with any separator. Devisto will detect and parse it automatically.

Excel

Devisto also supports .xlsx files. For now, only the first tab of the Excel file will be used for the import.

JSON

While CSV and Excel files are flat structures by nature, JSON files can contain nested data. Therefore, JSON files will be converted to a flat structure first, in order to import it to the table.

Clipboard

With the clipboard option, you can type or paste some CSV data. It can be handy to quickly import some data you have in another app, without the need to save it to a file first. A typical use case is selecting some range in Excel, and then copying and pasting it here.

URL

With the URL option, you can import data from any webservice. You can define all the settings of the call that needs to be made to the service: URL, method, headers, data, authentication method, and so on.

Twitter

With this option, you can import tweets from Twitter. You can enter one or more usernames and/or a search query to execute.

Google Spreadsheet

To import from a Google Spreadsheet, you'll have to follow some steps first:

  1. Click Connect Google Account and enter your Google credentials in the popup.
  2. Click Allow to allow Devisto to access your spreadsheets.
  3. The popup will show an access code. Select the code and copy it.
  4. Close the popup.
  5. Paste the code in the Code field in Devisto and click Get Access Token.
  6. Enter the Spreadsheet ID of your spreadsheet, which you can find in the URL of the sheet: https://docs.google.com/spreadsheets/d/<this-is-the-spreadsheet-id>.
  7. Optionally, enter the name of the tab you want to import. Leave empty to import the first tab.

Airtable

You can import from a table in Airtable. You'll need to enter some information:

  • API Key: you can find this key in your Airtable account. The first time, you'll have to click Generate API key to get a key.
  • Base ID: go to airtable.com/api and click the base you want to connect to. On the following page, you will see The ID of this base is ...
  • Table Name: enter the exact name of the table in your base.

Seeder

With this option, you can create or update entries with seed data. For each field, you can define what needs to happen: nothing, a fixed value, or a fake value. Using these settings, an import file will be generated which you can import just like a regular import file.

Mapping

After specifying your source, you will be presented with the first 10 rows of your import data. For each column, you can choose in which field the data needs to be imported. Based on the titles in the first row, Devisto will suggest fields automatically.

Updating Existing Data

By default, Devisto will create a new entry for each imported row. But it's also possible to update existing data.

In each mapping column, you'll see a Unique checkbox. When you check this checkbox for a column, then for each row to import, Devisto will check if there is already an entry with that value. If yes, the existing entry will be updated. Otherwise, a new entry will be created.

When the checkbox is checked for more than one column, Devisto will look for an entry with the combination of the values.

Translatable Fields

When you choose a translatable field, you'll have to select a language. It's possible to map the same field multiple times with different languages.

Relation Fields

When importing to a relation field, you'll have to select a field of the related table. The value of this field in the other table will be used to compare with the value in your import data. When a match is found, the found entry will be linked in the relation.

When the relation field is a multiple field, you can map several columns to the same relation field. The values will be merged when importing.

Asset Fields

When importing to an asset field, there are 2 options:

  • Your import data contains URLs to the assets. Devisto will fetch the assets from the URLs and save them in your project.
  • Your import data contains filenames. In that case, you have to select an asset folder. Make sure the files are in the asset folder before you run the import, and the filenames in your import file match the names of the files in the folder exactly. Devisto will try to find a match in the folder and copy the found asset(s) to the entry. Once the import is done, you can delete the asset folder, as it is no longer needed.

When the asset field is a multiple field, you can map several columns to the same asset field. The values will be merged when importing.

Synchronize

When you check Synchronize, entries in your table that were not present in the import data, will be deleted from the table after the import is done. That way, you get a one-on-one match in your table with your import file.

Testing Imports

When you check the Test switch, no real data will be created or updated. Instead, the import will only be simulated and you'll see the create, update and delete counts.

Scheduling Imports

When using online services as your import source (like URL or Twitter), you can schedule the import to run automatically at any give time. Click Add Schedule and choose a frequency. You can add as many scheduled times to an import as you want.

Scheduled imports will appear separately on top of the imports overview in a separate section. You can click on a scheduled import to modify it or to run it manually.

Every run of a scheduled import will appear in the second table, which in fact is a log of all imports that have run for this table. Imports resulting from a scheduled import will be cleaned up after 30 days.

Previous topic
← Scopes
Next topic
Exporting →