{{ transformations:CatalogCommandAction.png}}
====== CATALOG COMMAND ======
Category: Workflow / External\\
\\
=====Description=====
This action performs a process on the Data Catalog or Data Catalog resources:
* List Catalog items
* List Catalog directories
* Add/update item fields
* List item fields
* Delete item fields
* Delete item
* Move item
* Rename item
* Create directory
* Delete directory
* Move directory
* Rename directory
* Set metric value
* Get metric value
\\
=====Use cases=====
Use the various modes of this action to extract information about Catalog items, and manipulate the structure of the Data Catalog.
Use field items to store and retrieve metadata items about the resource or resource's data.
\\
=====Action settings=====
^ Setting ^ Description ^
|Command|Choose the process to perform on the Data Catalog. Refer to the details below for each mode.|
\\
====List Catalog item settings====
**Description:** Returns a dataset of information about any items within the selected directory. Columns include: Directory, Item name, Item type, Last modified, Definition, Parameters, Connector, Short description, and Long description.
^ Setting ^ Description ^
|In directory*|Enter or browse to the Catalog directory to list the items it contains. If this option is not selected, the action will return items in the\\ root Catalog directory.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====List Catalog directories settings====
**Description:** Returns a dataset listing the subdirectories of the selected directory (if any).
^ Setting ^ Description ^
|In directory*|Enter or browse to the Catalog directory to list the subdirectories it contains. If this option is not selected, the action will return\\ subdirectories of the root Catalog directory.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Add/Update item fields settings====
**Description:** Adds or updates the item field settings of the selected resource using values from the input dataset.
^ Setting ^ Description ^
|Item path*|Enter or browse to the Catalog directory to list the subdirectories it contains. If this option is not selected, the action will return subdirectories of the root Catalog directory.|
|Field names|Select a column from the input dataset to use for field item names.|
|Descriptions|Select a column from the input dataset to use for the field item descriptions.|
|Is optional|Check this to flag the field item as optional (i.e., this field may not be present in the result).|
|Delete item fields that are not on the list|Check this to remove any field items that do not match the items on the list set in this action.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====List item fields settings====
**Description:** Returns a dataset of the item's item fields and associated values.
^ Setting ^ Description ^
|Item path*|Enter or browse to the Catalog item to list the item fields it contains.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Delete item fields settings====
**Description:** Removes all, or the selected item fields from the selected item.
^ Setting ^ Description ^
|Item path*|Enter or browse to the Catalog item containing item fields.|
|Delete all fields|Select this option to remove //all// item fields from the resource.|
|Delete selected fields|Select this option to only remove the fields chosen in the list below it.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Delete item settings====
**Description:** Deletes the selected item from the Catalog.
^ Setting ^ Description ^
|Item path*|Enter or browse to the Catalog item to be removed.|
|If item doesn't exist|Select //Fail// to stop the workflow with an error, or //Do nothing// to continue the workflow.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Move item settings====
**Description:** Moves the selected item to a different directory.
^ Setting ^ Description ^
|Item path*|Enter or browse to the Catalog item to be moved.|
|New location*|Enter or browse to the Catalog directory the item will be moved to.|
|If item already exists|Select //Overwrite// to overwrite the existing item with the new one. Select //Fail// to stop the workflow with an error,\\ or //Do nothing// to continue the workflow without moving the item.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Rename item settings====
**Description:** Renames the selected Catalog item to the new name provided.
^ Setting ^ Description ^
|Item path*|Enter or browse to the Catalog item to be renamed.|
|New name*|Enter the new name for the item.|
|If item already exists|Select //Overwrite// to overwrite the existing item with the new one. Select //Fail// to stop the workflow with an error,\\ or //Do nothing// to continue the workflow without renaming the item.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Create directory settings====
**Description:** Creates a new directory within the selected directory (creates a subdirectory).
^ Setting ^ Description ^
|Location*|Enter or browse to the Catalog directory to create a new directory within (creates a subdirectory).|
|Name*|Enter the name for the new directory.|
|If directory already exists|Select //Fail// to stop the workflow with an error, or //Do nothing// to continue the workflow without creating the directory.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Delete directory settings====
**Description:** Removes the selected Catalog directory.
^ Setting ^ Description ^
|Directory*|Enter or browse to the Catalog directory to be deleted. Note: All items contained in this directory will be deleted\\ as well!|
|If directory doesn't exist|Select //Fail// to stop the workflow with an error, or //Do nothing// to continue the workflow without taking any action.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Move directory settings====
**Description:** Moves the selected directory to a different directory (selected directory becomes a //subdirectory// of the new location).
^ Setting ^ Description ^
|Directory*|Enter or browse to the Catalog directory to be moved.|
|New location*|Enter or browse to the destination directory to move the selected directory to.|
|If directory already exists|Select //Fail// to stop the workflow with an error, or //Do nothing// to continue the workflow without moving the directory.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Rename directory settings====
**Description:** Renames the selected directory to the name provided.
^ Setting ^ Description ^
|Directory*|Enter or browse to the Catalog directory to be renamed.|
|New name*|Enter the new name for the directory.|
|If directory already exists|Select //Fail// to stop the workflow with an error, or //Do nothing// to continue the workflow without renaming the directory.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Set metric value settings====
**Description:** Sets or updates the value of a catalog metric item.
^ Setting ^ Description ^
|Item path*|Enter or browse to the Catalog metric item to set or update the value of.|
|New value*|Enter the new metric item value to apply.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
====Get metric value settings====
**Description:** Retrieves the value of a catalog metric item.
^ Setting ^ Description ^
|Item path*|Enter or browse to the Catalog metric item to retrieve the value of.|
|Append column|By default, the returned metric value becomes the current dataset. Check this option //on// to append the\\ returned value to the current dataset in a new column.|
* Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
\\
=====Remarks=====
**Delete directory** - Use this mode //with caution// as any items stored within the selected directory will be deleted as well. Structure your workflow to detect and/or move any items you wish to keep before running this mode.
You can **set and remove field items and settings //manually//** using the //Data catalog// section from the //Start// tab. Click the down arrow at the top-right corner of the resource and select "Edit...". In the "Edit catalog item" window that appears, select the //Fields// tab.
\\
=====See also=====
* [[transformations:retrievecatalogitem|Retrieve Catalog item]]