All Products
Search
Document Center

DataWorks:Publish a function

Last Updated:Nov 13, 2024

You can associate a function with an API and use the function as a prefilter or a post-filter for the API only after you publish the function. This way, the function can process the request parameters or responses of the API. This topic describes how to publish a function on the DataService Studio page.

Prerequisites

  • A function is created and saved. For more information, see Manage functions.
  • The function is tested and successfully executed. For more information, see Test an API.

Publish a function

  1. Go to the DataService Studio page.

    Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Development and Governance > DataService Studio. On the page that appears, select the desired workspace from the drop-down list and click Go to DataService Studio.

  2. In the left-side navigation pane of the Service Development page, find the function that you want to publish and double-click the name of the function.
  3. On the configuration tab of the function, click Submit in the upper-right corner.
  4. In the right-side navigation pane of the configuration tab, click Version. On the Version tab, find the version that is in the Can Be Published state and click Publish in the Actions column.
    Pbulish
  5. After the function is published, click Version in the right-side navigation pane of the configuration tab to view the publishing record. You can also click Version Details or Roll Back in the Actions column.

What to do next

You can use the published function as a prefilter or a post-filter for an API. For more information, see Create a Python function and Create an Aviator function.