Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Table Mapping

Embedded Object Grooper.Activities

Defines column mappings between a container element in a Data Model and a database table.

Remarks

The Table Mapping class is used to configure how data extracted from a Data Model, Data Section, or Data Table is exported to a database table.

Overview

A Table Mapping specifies:

  • The source data element ('Source Scope') to export from, which can be a Data Model, Data Section, or Data Table.
  • The target database table ('Target Table') to receive the exported data.
  • The mapping of Grooper fields to database columns via the 'Column Mappings' property.
  • Optional duplicate detection using 'Match Columns' and the action to take on a match ('Match Action').
  • Optionally, columns to read back from the database after insert using 'Return Values'.

How It Works

For each instance of the selected source data element, a row is exported to the specified database table. The mapping between Grooper fields and database columns is defined using expressions, allowing for direct value export or calculated output.

If 'Match Columns' are specified, Table Mapping will check for existing rows in the database where the specified columns match the current record. The action taken on a match is determined by the 'Match Action' property (e.g., skip, update, or error).

When 'Return Values' are configured, values from auto-generated columns (such as identity columns or timestamps) can be read back and assigned to Grooper fields after the insert operation.

Example Usage

  • Export one row per document by setting 'Source Scope' to a Data Model.
  • Export one row per table row by setting 'Source Scope' to a Data Table.
  • Export one row per section instance by setting 'Source Scope' to a Data Section.

Notes

  • The Table Mapping object is typically used as part of a data export process, such as the Data Export behavior.
  • Expressions in 'Column Mappings' are written in Visual Basic .NET and can reference fields, perform calculations, or format values as needed.
  • For more information on mapping expressions, see the documentation for Column Map.

Properties

NameTypeDescription

See Also

Used By

Notification