Skip to main content
Version: 4.3

Import / Export

CMDBuild allows configuring templates that contain predefined parameters for executing bulk data import and export operations in different formats.

Templates can be used interactively from the Management Module or executed in batch mode through the Task Manager. Each template stores all the information required to automate the operation and avoid repeated configuration.

The following template types are supported:

File Template​

File templates support both import and export operations using CSV, XLS, or XLSX files.

Import templates can operate in:

  • Add mode: inserts new records only
  • Merge mode: updates existing records identified by a key, inserts new records, and manages missing records

Properties Tab​

Available operations:

  • create a new template
  • search templates
  • edit a template
  • clone a template
  • delete a template
  • disable a template

File Template

General Properties​

The following information is required:

  • Code: template identifier
  • Description: short description
  • Type: Import, Export, or Import and Export
  • Apply on: Class, Process, Domain, or view from join (export only)
  • Class / Process / Domain / View from join: target element
  • File format: CSV, XLSX, or XLS
  • Active: enables or disables the template

Format-specific parameters:

CSV format

  • CSV separator: comma, semicolon, pipe (|), or TAB
  • CSV encoding

XLS/XLSX format

  • Header row number: row containing column names
  • Data row number: first row containing data

General Properties

Attributes​

This section is used to configure attribute mapping.

  • Attribute: CMDBuild attribute name
  • Column name: corresponding column in the import or export file
  • Mode (Reference and Lookup attributes):
    • Id
    • Code
    • Description
    • Description Translation (Lookup attributes only)
  • Default value: default value used during import

The magic wand icon in the upper-right corner automatically generates the mapping table by including all attributes of the selected target element.

Attributes

Dates Format​

This section is displayed only when at least one Date or Date-Time attribute is included in the mapping.

It allows selecting the format used when importing or exporting date values.

Import Filter​

Available for Import and Import and Export templates.

  • Filter: restricts the imported data

Import Filter

Import Criteria​

Available only for Import and Import and Export templates.

  • Import mode: Add or Merge

When using Merge mode:

  • Import key attribute: one or more attributes used to identify existing cards
  • Missing records: handling of CMDBuild cards not present in the import source
    • No delete
    • Delete
    • Modify card
  • Handle missing records on error: forces execution even if errors occur

When missing records are managed through an update:

  • Attribute: attribute to modify
  • Value: value assigned to the attribute

Import Criteria

Export Filter​

Available for Export and Import and Export templates.

  • Filter: restricts exported data

Notifications​

The following options are available:

  • Notification template: email template used for notifications
  • Account: optional override of the default email account

Batch executions require notification settings to deliver execution results. Interactive executions display results directly in the user interface.

Notifications

Permissions Tab​

This section allows configuring permissions on the current template for specific user groups.

Permissions determine which groups can use the template.

For details on permission management, refer to the relative section.

Database Template​

Database templates allow importing data from relational databases such as PostgreSQL, MySQL, Oracle, or SQL Server.

A single template can update multiple CMDBuild classes using data extracted from different database tables.

Import operations can be executed in Add or Merge mode.

Properties Tab​

Available operations:

  • create a new template
  • search templates
  • edit a template
  • delete a template
  • disable a template

Database Template

General Properties​

  • Code
  • Description
  • Active

General Properties

Database Configuration​

  • Driver class name: PostgreSQL, MySQL/MariaDB, Oracle, or SQL Server
  • Address: database connection string
  • Username
  • Password
  • Error template

Database Configuration

Mapping Tab​

The Mapping tab is used to configure the relationship between CMDBuild classes and database tables.

Available operations:

  • add a mapping
  • search mappings
  • edit a mapping
  • clone a mapping
  • delete a mapping
  • disable a mapping

Mapping Tab

Mapping - General Properties​

  • Code
  • Description
  • Type
  • Apply on: Class or Domain
  • Class / Domain
  • Table name
  • Active

General Properties

Additional Configuration​

The remaining sections follow the same logic as File Templates:

  • Attributes
  • Dates Format (when applicable)
  • Import Filter
  • Import Criteria
  • Notifications

Import On Tab​

Defines the classes for which the template is available from the contextual menu.

Mapping Tab

Permissions Tab​

This section allows configuring permissions on the current template for specific user groups.

Permissions determine which groups can use the template.

For details on permission management, refer to the relative section.

GIS Template​

GIS templates allow importing planimetries from DWG or DXF files.

Data is always imported in Merge mode.

Properties Tab​

Available operations:

  • create
  • search
  • edit
  • delete
  • disable

GIS Properties Tab

General Properties​

  • Code: template identifier
  • Description: template description
  • Target class: main class associated with the GIS import
  • Import key attributes: attribute(s) used to identify cards during import
  • Import key source: DWG/DXF property used for card identification
  • Active: enables or disables the template

GIS Properties Tab

Shape Properties​

  • Enable shape import: imports non-CMDBuild objects (walls, windows, stairs, etc.) into GeoServer as background layers
  • Layer to import: import all layers, only specified layers, or all except specified layers
  • Source layers to include: comma‑separated list of layer names to include (used when selecting include)
  • Source layers to exclude: comma‑separated list of layer names to exclude (used when selecting exclude)
  • Target geo attribute: geographic attribute where imported geometries are stored

Shape Properties

Mapping Tab​

Mapping configuration follows the same logic used forDatabase Templates.

This includes:

  • creating, editing, cloning, and deleting mappings
  • enabling or disabling mappings
  • configuring mapping metadata
  • defining attribute mapping rules
  • configuring import criteria and missing record handling

Refer to the Database Template - Mapping section for complete details.

Import On Tab​

Defines the classes for which the template is available from the contextual menu.

Permissions Tab​

This section allows configuring permissions on the current template for specific user groups.

Permissions determine which groups can use the template.

For details on permission management, refer to the relative section.

IFC Template​

IFC templates allow importing BIM information from IFC files.

Data is always imported in Merge mode, updating existing cards (identified by a key), inserting new ones, and handling missing records according to the configured rules.

Properties Tab​

Available operations:

  • create a new template
  • search templates
  • edit a template
  • delete a template
  • disable a template

IFC Template

General Properties​

  • Code: template identifier
  • Description: template description
  • Active: enables or disables the template

IFC Template General Properties

Association Properties​

These settings define how IFC entities are associated with CMDBuild cards.

  • Has parent: enables association with a parent BIM project (e.g. an electrical plant IFC that belongs to a building project)
  • Associated class: class used to associate imported IFC elements (e.g. Building)
  • Source paths: path expressions used to identify the association key
  • Attributes: CMDBuild attributes populated from IFC data

IFC Template Association Properties

Mapping Tab​

Mapping configuration follows the same logic used for Database Templates.

This includes:

  • creating, editing, cloning, and deleting mappings
  • enabling or disabling mappings
  • configuring mapping metadata
  • defining attribute mapping rules
  • configuring import criteria and missing record handling

Refer to the Database Template - Mapping section for complete details.

Import On Tab​

Defines the classes for which the template is available from the contextual menu.

Permissions Tab​

This section allows configuring permissions on the current template for specific user groups.

Permissions determine which groups can use the template.

For details on permission management, refer to the relative section.