Import Descendants

Imports objects from a CMIS Repository which are children or descendants of a base CMIS Folder.

Remarks

Performs a traversal of the tree structure below a CMIS Folder, and imports child folders or documents which match a filter. CMIS Folders and their contents are most easily viewed using the CMIS Repository - Browse Repository tab in Design Studio, when a CMIS Repository is selected.

Inherits from: Import Provider

Properties

The following 16 properties are defined.

Property Name Description
General
Repository Type: CMIS Repository

The repository from which content will be imported.

Base Folder Type: CMIS Folder

Specifies the base folder containing the objects to be imported. The import process will iterate all descendants of this folder, and import objects matching the Import Filter.

Import Filter Type: String

Defines a filter which selects the objects to be imported. Filters are SQL-style query strings which specify what type of objects will be imported, and what conditions they must meet to qualify for import. They take the following general form:

SELECT * FROM <ContentType> [WHERE <Criteria>]

The following are examples of valid filters:

BindingDescriptionFilter
NTFSSelect all descendant files.SELECT * FROM File
NTFSSelect all files which are immediate children.SELECT * FROM File WHERE AT_LEVEL(1)
NTFSSelect files which are not hidden and end with 'PayrollReport.xslx'.SELECT * FROM File WHERE Hidden=False AND cmis:name LIKE '%PayrollReport.xslx'
SFTPSelect folders at level 1.SELECT * FROM Folder WHERE AT_LEVEL(1)
SharePointSelect PDF files larger than 100,000 bytes.SELECT * FROM Document WHERE FileExtension='.pdf' AND cmis:contentStreamLength>100000
ExchangeSelect mail messages having attachments with 'payroll' in the subject.SELECT * FROM Message WHERE Subject LIKE '%payroll%' AND HasAttachments=True

SELECT Clause

A filter must always begin with 'SELECT *'. Selecting individual properties is not supported.

FROM Clause

The FROM clause indicates the type of object to be imported. If the specified type is a base type, then all types inheriting from that type will be imported. For example, if a SharePoint repository defines two document-based types 'Invoice' and 'Purchase_Order', then the filter SELECT * FROM Document will select both Invoice and Purchase_Order objects. To select Invoice objects only, use SELECT * FROM Invoice.

WHERE Clause

The optional WHERE clause specifies one or more conditions items must match to be included in the import. Multiple conditions are joined with the AND/OR operators, and may be nested with parenthesis () to indicate order of operations. Each condition may be one of the following predicates:
Predicate TypeDescriptionExample
AT_LEVEL PredicateSpecifies a the level at which an item must exist, relative to the base folder. If an AT_LEVEL predicate is used, it should be the first predicate in the WHERE clause, and must be followed by an AND if other criteria is included.AT_LEVEL(1)
Comparison PredicateSpecifies a condition for an individual property.invoice_date < '12/31/2007'
IN PredicateSpecifies a list of allowed values for a property.FileExtension IN ('.pdf', '.docx', '.xlsx')
MATCHES PredicateSpecifies that a property value must match a regular expression.cmis:name MATCHES 'Daily Report for \d{4}-\d{2}\\d{2}.xlsx'
Scope PredicateRestricts the search scope to children or descendants of a folder.IN_FOLDER(/Inbox)
IN_TREE(/Inbox)
The NOT operator may be used to invert the logic of individual predicates or a group of predicates enclosed by (). Note that some CMIS Bindings have limited support for the NOT operator.

WHERE Clause

The WHERE clause specifies optional criteria each object must meet to qualify for import.

The WHERE clause may optionally begin with an AT_LEVEL() predicate, specifying the level at which items must exist below the Base Folder. If an AT_LEVEL predicate is used, it should be the first predicate in the WHERE clause, and must be followed by an AND if other criteria is included. For example, the following query will select all folders which are immediate children of the Base Folder, and have a name starting with 'payroll':

SELECT * FROM Folder WHERE AT_LEVEL(1) AND cmis:name LIKE 'Payroll%'

When querying folders, if no AT_LEVEL() predicate is present, AT_LEVEL(1) will be assumed

Comparison Operators by Property Type

Property TypeSupported OperatorsQuotedExample
String=, <>, LIKE, IN, MATCHESYesvendor_name LIKE 'acme logistics%'
Decimal=, <>, <, <=, >, >=, INNoinvoice_amount <= 1000.00
Integer=, <>, <, <=, >, >=, INNoquantity = 0
Boolean=Notax_exempt = true
DateTime=, <>, <, <=, >, >=, INYesinvoice_date < '01/01/2018'
ID=, <>Yestype_id='2fadac71-a9a9-4185-9070-e3b23517e518'
URI=, <>, LIKEYesvendor_website LIKE 'http://www.grooper.com/%'

Comparison Operator Details

OperatorDescriptionExample
INThe property value must match one of many values.FileExtension IN ('.pdf', '.docx', '.xlsx')
LIKEThe property value must contain a substring. The % character serves as a wildcard.cmis:name LIKE '%Report.xslx'
MATCHESThe property value must match a regular expression.cmis:name MATCHES 'Daily Report for \d{4}-\d{2}\\d{2}.xlsx'

Content Type Type: Content Type

Optionally assigns a Content Type to imported batch folders. If a Content Type is specified, this will take precedence over mappings. If no Content Type is specified, the import will rely on mappings. If no Content Type is specified and no mappings exist, the document will be imported unclassified.

Processing Options
Import Mode Type: ImportModes, Default: Full

The mode to be used when importing items. Can be one of the following values:

  • Full - Both properties and content will be loaded. This is the slowest import mode, because the full content of each document is copied during a single-threaded import process. As such, this mode is not well-suited for high-volume imports, but provides some useful advantages in low-volume import scenarios. For example, Normal mode allows items to be deleted immediately on import, which can be important when using the Import Watcher service. Also, Normal mode avoids the need for any follow-up load operations in the Batch Process.
  • Sparse - Properties will be loaded, but content will not. This mode is much faster than a Full import, because no content files are copied into Grooper. Instead, a link is saved on each Grooper document, and content is retrieved on demand directly from the CMIS Repository. This type of document is called a sparse document. Sparse documents can be used just like any other document, with the caveat that display and processing speeds may be reduced. After a sparse import, document content can be loaded in parallel using the Execute / CMIS Document Link - Load command.
  • LinkOnly - No content or properties will be loaded. This is the fastest import mode. It imports nothing more than a link to each document, and offloads all property and content loading to parallel operations in the Batch Process. After a LinkOnly import, document properties and/or content can be loaded using the Execute / CMIS Document Link - Load command.

Skip Count Type: Int32, Default: 0

Indicates the number of items to skip at the beginning of the sequence. Use this property to restart an import which was previously stopped.

Max Items Type: Int32, Default: 0

Indicates the maximum number of items to process. This can be used with Skip Count to perform incremental imports.

Disposition
Delete Item Type: Boolean, Default: False

Enables or disables deletion of the input item after import. This option can only be enabled when the Import Mode is set to 'Full'. Deleting objects on import is particularly useful when using the Import Watcher service to periodically query/poll for new documents. See documentation on the Import Watcher service for more information.

Move To Folder Type: CMIS Folder

Specifies the an optional folder to which items should be moved after import. Moving objects on import is particularly useful when using the Import Watcher service to periodically query/poll for new documents. See documentation on the Import Watcher service for more information.

Update Properties Type: String

Defines one or more property values to be updated on import. Specifies a list of key-value pairs, where 'key' is the name or ID of a property, and 'value' is the value to which the property should be set. The list should be formatted so that there is on entry per line, with each entry in the form key=value. For example, the following entry, when used with the NTFS binding, would set the Archive attribute of each imported file to False:

Archive=False

As another example, the following entry would set the Status field on a SharePoint document to 'IMPORTED'.

Status=Imported

Updating properties on import is particularly useful when using the Import Watcher service to periodically query/poll for new documents. See documentation on the Import Watcher service for more information.

Batch Creation
Starting Step Type: Batch Process Step

The step within a batch process where batches will be started.

Folder Levels Type: List of Folder Level Info

Defines the number of folder levels which will be translated into subfolders within the Grooper Batch.

Maximum Items per Batch Type: Int32, Default: 2500

The maximum number of items to be imported into a single batch.

Priority Type: Int32, Default: 3, Range: 1 - 5

The priority of the batch. The Priority value controls the order in which tasks are processed, with the value 1 representing the highest priority level, and the value 5 representing the lowest priority level. (i.e. Items of priority 1 are processed before items of Priority 2, and so on). The batch must be paused before this property can be edited.

Batch Name Prefix Type: String

An optional prefix to be prepended onto each batch name.

Example

Given the date is 01-02-2019 and the time is 1:39:00 PM, entering "Tommy Oliver's AP batch_:_" will result in the batch being named:

"Tommy Oliver's AP batch_:_ 2019-01-02 01:39:00 PM"

Start Paused Type: Boolean, Default: True

If true, created batches will be started in a paused state.

See Also

Batch Process Step, CMIS Folder, CMIS Repository, Content Type, Folder Level Info

Used By

Import Watcher