Re-use your code as a Code Asset
A Code Asset is code that has been written in a Space and has been transformed into a Code Asset, so it can be used as part of a Task.
The code used in your Code Asset is a copy of the code you saved in your Space that created a table or tables in publish_db
. Any changes you make to your saved code within the Space are not reflected in your code asset unless you refresh the Code Asset. For others to be able to edit the code for your Code Asset you they must be added to your Space as a collaborator.
Note: You must have an automation or automation administrator role to perform this action. The Automation icon on the navigation bar is not visible without one of these roles.
You must have saved and successfully executed a query (via Hue) in a Space.
Click on the Automation icon on the navigation bar.
Click on the Code Assets option.
Click Create Code Asset.
The New Code Asset page appears.Enter a Title.
Enter a Description.
Select the Code you want to turn into a code asset:
Select the relevant Space from the drop down list.
Select the code you saved.
It must have run successfully in the Space to ensure it is available to be used as a Code Asset.
Data Products and assets display a list of all products and assets in your Space.
If your Code Asset does not reference all products or assets in your Space then consider removing those that are not required to avoid downstream lineage restrictions.
Code Asset Sharing:
Add collaborators who can edit the Code Asset title and description.
Click Save.
Now you are able to schedule the execution of your code asset with a Task
Related Pages
Schedule the execution of your Code Asset with a Task
Â