Skip to main content
Version: ELN v4.x

Importing Data

Import Samples from Excel​

This is the simple import method. For the enhanced, validated import, see Importing Data with Column Mapping and Validation below.

Samples can be imported to Chemotion ELN by uploading a simple excel list that identifies each sample. Please add the SMILES strings in the respective column of the file to be imported and add the description "canonical smiles" as the header of the column.

A row can be identified in more than one way:

ColumnEffect
canonical smiles, or a molfileThe structure, as before
casFrom version 4.0 the structure can be looked up from a CAS number alone. The shipped templates have no such column, so one has to be added
sample idThe row updates an existing sample rather than creating one, for samples the user may edit
caution

A row with neither a structure nor a CAS number becomes a sample without a structure — a decoupled sample — rather than being rejected. A sample id column changes the import from creating samples to updating them, so check before importing a sheet exported from the ELN, which carries that column.

To enable the import into a collection, the desired target collection has to be selected. Import of samples is only possible for the user that created the collection. The export and import of samples is currently supported in the xlsx, csv, and sdf formats.

For a more comprehensive import of data into Chemotion ELN based on SMILES strings, please see the following example which can be used as a template to import data to the Chemotion ELN.


Importing Data with Column Mapping and Validation​

The Chemotion ELN supports an enhanced data import functionality that includes (smart) column mapping, and data validation. This feature allows users to import data more efficiently and with greater flexibility, supporting multiple file formats such as Excel, SDF, and CSV. The new functionality is designed to handle both small and large datasets, ensuring a seamless user experience.

Overview of the Import Process​

The import process consists of the following steps:

  1. File Upload: Upload the file to be imported.
  2. Column Mapping: Match file columns to database columns.
  3. Data Validation: Review and edit the data in an interactive grid with feedback loop.
  4. Import Execution: Upon execution of Import process, the data will be imported directly or via a backend job for large files.

Step 1: File Upload​

To begin the import process:

  1. Navigate to the desired collection in Chemotion ELN and click on the respective toolbar icon to open a list of options as shown below.
  2. Click on the Import Samples to collection button.
  3. Drag and drop your file into the upload area or select it manually. Supported file formats include:
    • Excel (.xlsx)
    • SDF (.sdf)
    • CSV (.csv)
  4. The user can download any of the templates (available in .xlsx and .sdf format) by clicking on the Download Template button.

File Type Selection​

  • Sample Import: For importing sample data only.
  • Chemical Sample Import: For importing chemical data along with sample data.

Once the file is uploaded, the system will detect the file format and extract the column names.


Step 2: Column Mapping​

The column mapping interface allows users to match the columns in a file to the database fields in Chemotion ELN. This step ensures that the imported data is correctly aligned with the database schema.

Features of the Column Mapping Interface​

  • Row View and Column View: Switch between two views for mapping:
    • Row View: Displays columns in a list format.
    • Column View: Displays columns in a card format.
  • Smart Mapping: Automatically suggests mappings based on naming similarity to database columns.
  • Manual Mapping: Select the appropriate database field for each column using dropdown menus.

How to Use​

  1. Review and check the suggested mappings provided by the Smart Mapping feature.
  2. Adjust the mappings manually if needed.
  3. Click Validate to proceed to the validation step.

Step 3: Data Validation​

The validation component ensures that the imported data adheres to the required standards before being added to the database. This step uses robust validation rules defined in the system to check for errors and inconsistencies.

Features of the Validation Grid​

  • Interactive Editing: Edit cell values directly in the grid.
  • Error Highlighting: Invalid data is highlighted with detailed error messages.
  • Row Operations: Add new rows or delete existing rows.
  • Pagination: Navigate through large datasets with grid pagination.
  • Row Numbers: Each row is numbered for simple navigation.

Validation Process​

The validation process consists of two main steps:

  1. Schema Validation: fields in the data are validated against predefined schema rules. The schema defines the expected data type, format, and constraints.
  2. Field-Specific Validations: Additional validations are applied to specific fields based on their properties. These validations ensure that the data is not only syntactically correct but also semantically meaningful.

How to Use​

  1. Review the data in the grid.
  2. Correct any errors highlighted in the grid. Errors are displayed with detailed messages to guide the user.
  3. Add or delete rows as needed.
  4. Click Validate to ensure all data is valid.

Validation Process​

The validation process ensures that the data meets specific field requirements. This functionality provides a unified validation mechanism for both chemical and sample data. These functions determine the appropriate schema and validation rules based on the field type and data context. Below is a detailed explanation of the validations applied:

Numeric Fields​
  • Fields: target_amount_value, real_amount_value, purity, molecular_mass, refractive_index
  • Validation: The value must be a valid number. Empty values are considered valid but are replaced with default values if provided.
Boolean Fields​
  • Fields: dry_solvent, is_top_secret, decoupled
  • Validation: The value must be a valid boolean. Accepted formats include true/false, yes/no, 1/0, and y/n.
Numrange Fields​
  • Fields: melting_point, boiling_point
  • Validation: The value must be a valid numeric range. Accepted formats include single numbers (e.g., "100") and ranges (e.g., "100-200"). The lower bound must not exceed the upper bound.
Fields with Units​
  • Fields: density, molarity, flash_point
  • Validation: The value must include both a numeric value and a valid unit. For example:
    • density: Must include units like g/mL or g/cm³.
    • molarity: Must include units like M or mol/L.
    • flash_point: Must include temperature units like °C, °F, or K.
Solvent Field​
  • Field: solvent
  • Validation: The value must be a slash-separated list of valid solvents (e.g., "Methanol/Water"). Each solvent must be in the predefined list of valid solvents.
String Fields​
  • Fields: name, description, sum_formula, cas, location, external_label, impurities
  • Validation: The value must be a string, it can also be an empty string.
Chemical-Specific Fields​
  • Fields: status, vendor, order_number, price, expiration_date
  • Validation: These fields are validated using rules specific to chemical data. For example:
    • price: Must be a valid number with an optional currency symbol.
    • expiration_date: Must be a valid date in the format YYYY-MM-DD.

Error Highlighting​

If a field fails validation, it is highlighted in the grid with a detailed error message. For example:

  • Invalid Numeric Value: "Value 'abc' cannot be converted to a number."
  • Invalid Range: "Value '200-100' is not a valid range. The lower bound must not exceed the upper bound." — this strictness applies to the column-mapping grid; an import done without the grid accepts a reversed range and swaps it.
  • Missing Unit: "Value '1.2' is missing the expected unit (e.g., 'g/mL')."

Users can correct the errors directly in the grid and revalidate the data.

This detailed explanation of the validation process ensures that users understand how their data is checked and how to resolve validation errors.


Step 4: Import Execution​

Once the data is validated, users can proceed with the import.

From version 4.0 every sample import runs in the background, whatever the size of the file, so work can continue while it is processed. A notification arrives when it finishes.

What the notification says​

The notification opens with how much was imported — Imported 18 of 20 rows from 'samples.xlsx' into 'My collection' — and lists anything that needs attention beneath it, one line each: rows that could not be imported, existing samples that were updated, rows brought in without a structure, and rows skipped entirely. Long lists of row numbers stop after twelve and say how many more there are.

The row numbers are the rows of the uploaded sheet, counting the header as row 1, so they can be looked up directly.

A notification reporting a problem stays until it is dismissed; a clean import disappears by itself.

The import report​

Every import that gets as far as reading the sheet produces a report workbook, a successful one included. It arrives in the inbox, named after the uploaded file, and the notification carries a Download link to it.

The workbook has a sheet named import report holding the original columns that were used, plus import status, import notes and sample id. Rows are coloured by what happened to them — red where nothing was imported, grey and italic where the row was skipped — and single cells are marked amber where a value could not be used as written. The sample id column links to the sample that was created.

When something needs fixing, a second sheet appears, named sample. It holds the rows to correct, and importing that file again applies the corrections: rows that already produced a sample carry its id and are updated, while rows that failed carry none and are created afresh. This is the intended way to work through a partly failed import, rather than editing the original file.

note

After a column-mapping import the report is named validated_data_import_report.xlsx, and its row numbers refer to the data as the grid submitted it rather than to the original file.


Additional Notes​

  • Backend Job Handling: The backend job ensures that large imports do not disrupt the user experience. The system will notify the user when the import is complete.

See further information in the section about toolbar.