Skip to main content
Skip table of contents

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.

  1. Click on the Automation icon on the navigation bar.

  2. Click on the Code Assets option.

  3. Click Create Code Asset.
    The New Code Asset page appears.

  4. Enter a Title.

  5. Enter a Description.

  6. Select the Code you want to turn into a code asset:

    1. Select the relevant Space from the drop down list.

    2. 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.

  7. Data Products and assets display a list of all products and assets in your Space.

    1. 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.

  8. Code Asset Sharing:

    1. Add collaborators who can edit the Code Asset title and description.

  9. 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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.