Command—export - trillium_discovery - trillium_quality - 17.2

Trillium DQ Repository Administrator Guide

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Discovery
Trillium > Trillium Quality
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 export command exports information from the repository to a virtual directory named export in the repository install path on the Trillium server. For example, ../MBSW/17/Data/export.

Note: The Control Center supports a local export (to the client machine), and a server export. The command line only supports a server export to a virtual directory. The virtual directory is named export by default, but can be changed in the _control repository if required. Contact Precisely Support for help editing _control.

Syntax

export <object_type> entity <entity_id> filename</export/<filename> filetype <filetype>

where,

<object_type>

Indicates the type of List View information you want to export. The options are:

rows—exports rows in a List View

rule—exports all business rules associated with a specific entity

rules—exports all business rules in the repository

passing_rows—exports rows that pass the conditions or restrictions of the specified business rule 

failing_rows—exports rows that fail the conditions or restrictions of the specified business rule

list_entities—exports details for all entities

list_attributes—exports details for all attributes in a specified entity

list_dependencies_per_attribute—exports details about dependencies for a specified attribute and entity

list_contradictions—exports dependency conflict details for a specified entity

The syntax for the export command is determined by which of these options you select.

<entity_id>

Number that identifies the entity you want to export.

</export/filename>

Name of the virtual directory and file to which the data will be exported. (File extensions are implied by the file type and do not need to be specified.)

The virtual directory is generally named export and must specified in the command.

<filetype>

Indicates the type of file to which the data will be exported. The options are:

xml

csv

txt

ddl

ddx

In txt and csv output files, the quote (&quot;) are used around data values that contain the delimiter.

Delimiter for output files:

txt - tab

csv - comma

The Control Center supports HTML file as an output file type when you use the local export function. That function is not available from the command line.

Optional Parameters

Parameter

Description

attribute <id>

The name and ID number of the attribute you want to export. Use when exporting failing or passing rows for an attribute business rule.

br_name <busrule_name>

Name of the business rule you want to use to filter passing or failing rows before export. Use this parameter when the export object type is either passing_rows or failing_rows.

canon

Specifies the rows to be exported.

encoding <encoding_name>

Character encoding used by the data file.

keypattern

Specifies the entity number.

output <colname colname>

List of attribute columns, separated by whitespace, to export.

If the output parameter is not specified, all columns in the List View are exported.

To add additional columns, such as a business rule XML expression, specify all required fields with this parameter.

parent_eid <library entity ID>

If you are exporting rows from an inherited/derived rule, you must specify the number that identifies the ID of the library (parent) entity.

Any changes to the inherited/derived (child) rule as a result of running the export command will be propagated to the parent rule. For example, see Export All Rows that Pass a Library Business Rule.

Examples

These command line examples show the different types of information you can export by specifying the repository object you want to export. You can export rows or attributes, business rules, and passing or failing rows associated with a business rule. See specific command line examples below.

Export All Entity Rows to an XML file

export rows entity 11 filename /export/usdatarows filetype xml encoding utf-8

Export All Entity Rows to a CSV file

export rows entity 11 filename /export/usdatarows filetype csv encoding utf-8

Export Surname and First Name Attributes in an Entity

export rows entity 33 filename /export/two filetype xml encoding utf-8 output {surname {first name}}
Note: When multiple column names are represented within a space-delimited line, be sure to enclose them in braces ({}). If a column name contains white space, enclose the column name in braces ({}) also.

Export All Business Rules for a Repository

export rules filename /export/allrules filetype xml encoding utf-8
Note: The repository from which the business rules are exported is the repository you logged on to when you responded to the repository: prompt.

Export All Business Rules for an Entity

export rule entity 6 filename /export/ent6rules filetype xml encoding utf-8

Export All Rows that Fail an Entity Business Rule

export failing_rows entity 22 br_name my_entity_businessrule filename /export/ent22failrows filetype xml

Export All Rows that Pass an Attribute Business Rule

export passing_rows entity 51 attribute 12 filename /export/attribute12passrows filetype xml br_name ABR_boston_sales

Export All Rows that Pass a Library Business Rule

export passing_rows entity 22 br_name my_businessrule filename /export/ent22passrows filetype xml parent_eid 10

Export Details for All Entities in the Repository

export list_entities filename /export/ents filetype xml

Export Details for All Attributes in an Entity

export list_attributes params {-keypattern 21} filename /export/exportedfile filetype xml
Note: In this example, the keypattern parameter specifies the entity number

Export the Attribute Metadata For a Given Attribute (8) and Entity (11)

export list_attributes_pivoted params {-keypattern {11 8}} filename /export/attribute filetype xml

Export Dependency Data

export list_dependencies_per_attribute params [list -entity $eID -attribute $attrID -in {STATUS {Discovered}}] filename /export/Dependencies filetype csv

where, $eID and $attrID are entity and attribute IDs respectively.

Export Dependency Conflict Data

For a single left-hand side attribute:

export list_contradictions params [list -entity $EID -keypattern [list $rhsAID $lhsAID] -canon [list RH_ATTR $rhsAID LH_ATTRS $lhsAID]] filename /export/Dependencies_Conflicts filetype csv

For multiple left-hand side attributes:

export list_contradictions params [list -entity $EID -keypattern [list $rhsAID [list $lhsAID1 $lhsAID2]] -canon [list RH_ATTR $rhsAID LH_ATTRS [list $lhsAID1 $lhsAID2]]] filename /export/Dependencies_Conflicts filetype csv

where, $EID is the entity ID, $rhsAID is the right-hand side attribute ID, and $lhsAID is left-hand side attribute ID.

Export Failing Rows Using ID of Parent Entity

export failing_rows entity 1 br_name test filename /export/testfile filetype txt parent_eid 2

where parent entity id is 2