Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Importing Sample Products

Import a small product catalog from a public JSON file into Emporix custom entities with the Import Tool.

This path is a single-stream Import Tool example that uses a static product JSON file. You create an HTTP connection to the file, import the items array into a custom entity, then review the instances in Management Dashboard.

Work through each section in order from top to bottom.

Before you start

See Access preparations for optional Import Tool access setup. For the full procedure, see Prerequisites for the Import Tool.

Custom entity for this example

Create a custom entity type before you map fields. The entity ID must be capitalized.

  • DEMO_PRODUCT – add mixin attributes whose Key values match the sample fields you want to import, for example productCode, productName, shortDescription, productGroup, manufacturer, and unitPrice

Use field types that fit the sample values: Text for codes and names, and Decimal for unitPrice.

If you do not set a custom Key, Management Dashboard generates an ID by default. For this tutorial, set custom keys that match the sample field names so Map from source can match them in later steps.

DEMO_PRODUCT mixin Fields tab with productCode productName and unitPrice
Mixin fields for `DEMO_PRODUCT`. Use matching **Key** values and set `productCode` to **Text**.

For more details on how to do the setup, see Custom Entities and Mixin Schemas.

Sample file

Open the sample source file. It is a public JSON file hosted by Emporix:

The body looks like this:

The import reads the items array. Each product uses productCode as its stable key. You can map only the fields you created on DEMO_PRODUCT and leave the rest unmapped.

Creating a connection

Store an HTTP connection that points at the Emporix Cloudinary folder that contains the sample file.

1

Create the Demo Product connection

In Management Dashboard, open the Import Tool perspective. In the sidebar, go to Connections and choose + New connection.

2

Enter the HTTP details

Enter the following connection details:

  • Name – Demo Product

  • Source type – HTTP / REST API

  • Base URL – https://res.cloudinary.com/saas-ag/raw/upload/v1791295646/emporix-docs

  • Test endpoint – /Import_Tool_sample.json

  • Authentication – None

  • Field discovery – Choose None — each stream samples its own endpoint.

Save your configuration and then Test connection. When the connection is confirmed, you get a Connection OK notification.

Edit Connection dialog for Demo Product with Connection OK
HTTP / REST API connection for the Demo Product sample JSON file with a successful connection test

Creating an import and stream

Create one Demo Product import with one stream that reads the sample file and writes into DEMO_PRODUCT.

1

Create the import

Go to Imports and choose + New import. Enter Demo Product in Name and a short Description, then continue to the import details view.

2

Enter the stream request details

Choose + New stream and enter:

  • Name – Demo Product

  • Connection – Demo Product

  • Resource name – Demo Product

  • Method – GET

  • Path – /Import_Tool_sample.json

  • Records path – items

  • Response format – JSON

  • Pagination method – None (single request)

Choose Sample endpoint to call the path once and list the fields returned for the key picker.

New Stream dialog with Demo Product path and records path items
New Stream request details. Enter **Path** `/Import_Tool_sample.json` and **Records path** `items`, then choose **Sample endpoint**.
3

Set the key and target

Continue in the same dialog and set:

  • Key field – productCode

  • Target – emporix.customEntity

  • Target type – DEMO_PRODUCT

Save the stream.

New Stream dialog with key field productCode and target type DEMO_PRODUCT
Key field, target, and target type for the Demo Product stream

Configuring the HTTP endpoint and key resolution

On the stream row, choose the edit icon. Open the HTTP endpoint tab and confirm you have the following configuration:

  • Method – GET

  • Path – /Import_Tool_sample.json

  • Response format – JSON

  • Records path – items

Choose Save if you change anything.

HTTP endpoint tab for the Demo Product stream
HTTP endpoint settings for the Demo Product stream

Open the Key resolution tab and confirm Key field is productCode.

Key resolution tab with Key field set to productCode
Key resolution for the Demo Product stream with **Key field** set to `productCode`

Mapping and publishing fields

1

Open the field mapping editor

On the stream row, choose Edit mapping.

Stream actions menu with Edit mapping highlighted
Stream actions menu with **Edit mapping**
2

Fetch a sample and map fields

Choose the Target schema version for your DEMO_PRODUCT type. Choose Fetch sample to load sample source records.

If the mixin schema has a custom Key, that key appears in Target schema. If you did not set a custom key for the schema, the picker shows id instead.

Choose Map from source. When source field names match mixin Key values, the Import Tool adds those mappings automatically. Use + Add row for any field that did not match.

If a source field such as productCode did not get a usable mixin Key, add the mapping manually with + Add row.

Target Field lists mixin schema attributes only. On the Custom Instances list, Id and Name stay key-based, for example derived from productCode. Product names such as Oak Dining Chair appear on the mixin tab after you open an instance.

Field Mapping for Demo Product with source fields mapped to DEMO_PRODUCT attributes
Field Mapping after fetching a sample and mapping product fields to the `DEMO_PRODUCT` schema
3

Preview and save

Choose Preview to check the mapped values. If the values are OK, choose Save for the stream mapping.

Until you publish, the mapping stays a draft. Real runs use the last published version, or fail if nothing is published yet.

Field Mapping preview for Oak Dining Chair sample
Mapping preview for a sample product record

Running the import

1

Preview with a dry run on the draft

Go back to the import details view and choose Dry run. Choose a sample size and Draft, then choose Run dry run. If the dry run succeeds, you get a success notification.

After the dry run finishes, choose Dry run again, then choose View mapped sample.

Dry-Run Mapped Sample dialog with mapped product records
Mapped sample from a dry run for the Demo Product stream
2

Publish the mapping

Open Edit mapping again and choose Publish. Until you publish, real runs keep using the last published version, or fail if nothing is published yet.

After you publish, choose Dry run again. Keep Published mappings selected, choose a sample size, then choose Run dry run. Review View mapped sample to confirm the published mapping.

3

Run a full import

Choose Run options and then Run Full. Confirm the stream selection, then choose Run streams.

Run Options dialog with Run Full highlighted
Run Options. Choose **Run Full** for this learning path.

Go to the Imports view and choose Refresh to update the import status and error counts.

Reviewing results

1

Review run history and imported data

From the import actions menu, choose Run history.

Import actions menu with Run history highlighted
Import actions menu with **Run history**
Run history with a succeeded full run for Demo Product
Run history with per-stream logs and record counts

From the stream actions menu, choose View imported data. Each row shows the source Key (productCode), the target Emporix ID, Outcome, and Imported At.

Stream actions menu with View imported data highlighted
Stream actions menu with **View imported data**
Imported Data list with productCode keys and UPSERTED outcomes
Imported data for the Demo Product stream
2

Open the DEMO_PRODUCT instances

In Management Dashboard, go to Custom Instances and open the list for your DEMO_PRODUCT type.

Custom Instances list of DEMO_PRODUCT records after import
Imported `DEMO_PRODUCT` instances. List **Id** and **Name** use the stream key, for example `productcode-chair-oak-001`.

Open one instance, for example productcode-chair-oak-001. On the mixin tab, for example Demo Product, check the mapped values such as productName, manufacturer, and unitPrice.

DEMO_PRODUCT instance details with mapped Demo Product attributes
Mapped attributes on a `DEMO_PRODUCT` instance

What to do next

This products trail is complete on its own. For a different example that uses a public REST API with related streams, see Importing Users and Posts and then Embedding Comments on Posts.

Use the other Import Tool guides for options this trail does not cover:

Troubleshooting

Problem
What to do

Test connection is unavailable

Choose Save first. You can test only after the connection is stored.

Test connection fails

Confirm Base URL ends at .../emporix-docs, Test endpoint is /Import_Tool_sample.json, and Authentication is None.

Fetch sample returns no records

Confirm Path is /Import_Tool_sample.json and Records path is items. Choose Sample endpoint when you create the stream if the key picker is empty.

Map from source adds no rows

Confirm the DEMO_PRODUCT attributes use the same Key values as the JSON fields, then choose the correct Target schema version.

productCode imports as 0

Change the mixin field type for productCode to Text, save a new schema version, update the mapping, publish, and run again.

Dry run or Full run fails, or Field Mapping shows Never published

Choose Publish on the field mapping, then open Run history.

Imported Data is empty

Confirm the last full run created or upserted records. Dry runs do not write target records.

Custom Instances shows no products

Confirm the full run succeeded, then open Custom Instances for DEMO_PRODUCT.

Last updated

Was this helpful?