Command—loadentity  - trillium_discovery - trillium_quality - 17.2

Trillium DQ Repository Administrator Guide

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Quality
Trillium > Trillium Discovery
Version
17.2
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium DQ Repository Administrator Guide
First publish date
2008
Last updated
2024-07-01
Published on
2024-07-01T08:53:20.448228

The loadentity command creates a real entity by loading data to a copied entity. The entity is first created using the copyentity command. The examples below show how to use the copyentity and loadentity commands together.

The command requires that you know the entity identifier for the entity into which you want to load the data. Trillium assigns entity ids when it creates the entity.

When the command completes, it returns a job identifier for the load job.

Syntax

loadentity <entity_id>

where <entity_id> is the number that identifies the entity you want to copy.

Optional Parameters

Parameter

Description

datasource  <name>

Name of the data source file or table from which the data will be loaded. Use quotes around the file or table name if the name includes spaces.

skip <number>

Number of rows to skip before starting to import data rows. All rows after the skipped rows will be loaded to the repository. For example, if your file has 300 rows and you select to skip the first 99, the system will load 200 rows, starting with the 100th row.

first <number>

Number of records from the beginning of the file (for example, the first 1000 records) to load.

random <percentage>

The degree to which you want to randomly sample a percentage of records from the file.

passrule <business_rule_name>

Name of the business rule which defines which passing rows will be used as the row filter during the load process.

failrule <business_rule_name>

Name of the business rule that defines the failing rows that will be used to filter rows during the load process.

Example

This command sequence creates a variable for the copyentity operation that copies entity 15 to a new entity. The loadentity command loads the first 10 rows of data in the “sequence two.txt” file and creates it as an entity. It also returns the job identifier for the load job.

Note: It is important that the data source you specify matches the schema of the original source entity specified in the copyentity command.
set entid [copyentity 15]
45
loadentity $entid datasource "sequence two.txt" first 10
Successfully started job 394

This sequence creates a variable for copyentity that copies entity 15 to a new entity. The loadentity loads only rows that pass the “highseqrule” business rule into the entity. It returns the job ID for the load job.

set entid [copyentity 15]
46
loadentity $entid passrule highseqrule
Successfully started job 395