Job Filters: Filter By Name Pattern



On This Page

Overview

This filter allows you to filter files and/or folders based on the name pattern. An asterisk can be used for exact matches or for prefix or suffix matches. For example, “*txt” would filter all .txt extensions. You can also use asterisks to surround a pattern to filter file and/or file names. For example, using “*test*” would filter all names that contain “test.” Use semicolons for multiple match patterns. For example, “*.txt;*.tmp” would filter all .txt and .tmp extensions.


Filter Using REST API

Patterns can be used to filter containers (folders) and items (files) based on the name. 

Attributes

Attribute

Description

Attribute

Description

text

The pattern to use to filter items. An asterisk (*) can be used for exact matches or prefix/suffix matches (e.g. *txt for .txt extensions). To filter file and/or folder names, you can use wildcard to surround a pattern (e.g. filter names that contain *text*). Use a semicolon (;) for multiple patterns (e.g. *.txt;*.tmp).

Matches will ignore case. For example, a text value of "secret" will match values including secret, Secret, and SECRET.

targets

An optional array of item types, including container, item, all, or none. By default all is used.

type

filter_pattern or pattern are the only allowable values for this filter type. Both values signify the same filter.



Example

The example below excludes any container with “secret” as any part of its name from being transferred from the source.

{ "name":"Sample Job | Do not transfer any container with 'secret' as a part of its name", "kind": "transfer", "transfer": { "transfer_type": "copy", "audit_level": "trace", "batch_mode": "always", "conflict_resolution": "latest", "delete_propagation": "ignore_both", "failure_policy": "continue", "large_item": "skip", "lock_propagation": "ignore", "max_items_per_container": 10000, "performance": { "parallel_writes": { "requested": 2 } }, "permissions": { "policy": "add", "links": true, "failures": "exceptions" }, "preserve_owners": true, "timestamps": true, "empty_containers": "create", "duplicate_names": "rename", "item_overwrite": "overwrite", "restricted_content": "convert", "segment_transform": true, "versioning": { "preserve": "native", "select": "all" }, "group_map": { "id": "{{group_map_id}}", "type": "group_map" }, "account_map": { "id": "{{account_map_id}}", "type": "account_map" }, "filter":{ "source":[ { "action":"exclude", "rules":[ { "rules": [{ "text": "*secret*", "targets": [ "container" ], "type": "filter_pattern" }], "type":"filter_rule" } ], "type":"filter_rule" } ] }, "source": { "connection": { "id": "{{cloud_connection_source}}" }, "impersonate_as": { "email": "joe@smith.com" }, "target": { "path": "/sourcePath" } }, "destination": { "connection": { "id": "{{cloud_connection_destination}}" }, "impersonate_as": { "email": "joe@smith.com" }, "target": { "path": "/destinationPath" } }, "simulation_mode": false }, "schedule": { "mode": "manual" }, "stop_policy": { "on_success": 5, "on_failure": 5, "on_execute": 25 }, "category": { "name": "Reports | Jobs with Exclude Name Pattern Filters" } }

 





DryvIQ Migrate Version: 5.9.1
Release Date: November 7, 2024