MINOR - Automator - Remove tags by label type (#19681)

* MINOR - Automator - Remove tags by label type

* MINOR - Automator - Remove tags by label type

* MINOR - Automator - Remove tags by label type

* MINOR - Automator - Remove tags by label type

* MINOR - Automator - Remove tags by label type

---------

Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com>
This commit is contained in:
Pere Miquel Brull 2025-02-11 15:22:09 +01:00 committed by GitHub
parent d897332c26
commit 92c9f0754b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 62 additions and 16 deletions

View File

@ -21,12 +21,18 @@
}, },
"applyToChildren": { "applyToChildren": {
"title": "Apply to Children", "title": "Apply to Children",
"description": "Remove descriptions from all children of the selected assets. E.g., columns, tasks, topic fields,...", "description": "Remove descriptions from the children of the selected assets. E.g., columns, tasks, topic fields,...",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "../../../../../type/basic.json#/definitions/entityName" "$ref": "../../../../../type/basic.json#/definitions/entityName"
}, },
"default": null "default": null
},
"applyToAll": {
"title": "Apply to All",
"description": "Remove descriptions from all the children and parent of the selected assets.",
"type": "boolean",
"default": null
} }
}, },
"required": ["type"], "required": ["type"],

View File

@ -10,6 +10,15 @@
"type": "string", "type": "string",
"enum": ["RemoveTagsAction"], "enum": ["RemoveTagsAction"],
"default": "RemoveTagsAction" "default": "RemoveTagsAction"
},
"labelType": {
"description" : "Remove tags by its label type",
"type": "string",
"enum": [
"Manual",
"Propagated",
"Automated"
]
} }
}, },
"properties": { "properties": {
@ -26,16 +35,30 @@
"$ref": "../../../../../type/tagLabel.json" "$ref": "../../../../../type/tagLabel.json"
} }
}, },
"labels": {
"description": "Remove tags by its label type",
"type": "array",
"items": {
"$ref": "#/definitions/labelType"
},
"default": null
},
"applyToChildren": { "applyToChildren": {
"title": "Apply to Children", "title": "Apply to Children",
"description": "Remove tags from all the children of the selected assets. E.g., columns, tasks, topic fields,...", "description": "Remove tags from the children of the selected assets. E.g., columns, tasks, topic fields,...",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "../../../../../type/basic.json#/definitions/entityName" "$ref": "../../../../../type/basic.json#/definitions/entityName"
}, },
"default": null "default": null
},
"applyToAll": {
"title": "Apply to All",
"description": "Remove tags from all the children and parent of the selected assets.",
"type": "boolean",
"default": null
} }
}, },
"required": ["type", "tags"], "required": ["type"],
"additionalProperties": false "additionalProperties": false
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2024 Collate. * Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
@ -10,14 +10,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/**
/**
* Remove Owner Action Type * Remove Owner Action Type
*/ */
export interface RemoveDescriptionAction { export interface RemoveDescriptionAction {
/** /**
* Remove descriptions from all children of the selected assets. E.g., columns, tasks, topic * Remove descriptions from all the children and parent of the selected assets.
*/
applyToAll?: boolean;
/**
* Remove descriptions from the children of the selected assets. E.g., columns, tasks, topic
* fields,... * fields,...
*/ */
applyToChildren?: string[]; applyToChildren?: string[];

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2024 Collate. * Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
@ -10,27 +10,42 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/**
/**
* Remove Tags Action Type * Remove Tags Action Type
*/ */
export interface RemoveTagsAction { export interface RemoveTagsAction {
/** /**
* Remove tags from all the children of the selected assets. E.g., columns, tasks, topic * Remove tags from all the children and parent of the selected assets.
*/
applyToAll?: boolean;
/**
* Remove tags from the children of the selected assets. E.g., columns, tasks, topic
* fields,... * fields,...
*/ */
applyToChildren?: string[]; applyToChildren?: string[];
/**
* Remove tags by its label type
*/
labels?: LabelElement[];
/** /**
* Tags to remove * Tags to remove
*/ */
tags: TagLabel[]; tags?: TagLabel[];
/** /**
* Application Type * Application Type
*/ */
type: RemoveTagsActionType; type: RemoveTagsActionType;
} }
/**
* Remove tags by its label type
*/
export enum LabelElement {
Automated = "Automated",
Manual = "Manual",
Propagated = "Propagated",
}
/** /**
* This schema defines the type for labeling an entity with a Tag. * This schema defines the type for labeling an entity with a Tag.
*/ */
@ -54,7 +69,7 @@ export interface TagLabel {
* label was propagated from upstream based on lineage. 'Automated' is used when a tool was * label was propagated from upstream based on lineage. 'Automated' is used when a tool was
* used to determine the tag label. * used to determine the tag label.
*/ */
labelType: LabelType; labelType: LabelTypeEnum;
/** /**
* Name of the tag or glossary term. * Name of the tag or glossary term.
*/ */
@ -79,7 +94,7 @@ export interface TagLabel {
* label was propagated from upstream based on lineage. 'Automated' is used when a tool was * label was propagated from upstream based on lineage. 'Automated' is used when a tool was
* used to determine the tag label. * used to determine the tag label.
*/ */
export enum LabelType { export enum LabelTypeEnum {
Automated = "Automated", Automated = "Automated",
Derived = "Derived", Derived = "Derived",
Manual = "Manual", Manual = "Manual",