Importing a User-Defined Functions Library or User-Defined Function

Import a functions library or a user-defined function to a library in a Data Integration workspace.

To import a functions library or a user-defined function, specify the exported object's zip file and its Object Storage location. Before you import, ensure that you have the relevant permissions and IAM policies as described in Required Setup and Policies.

    1. Navigate to the workspace in which you want to import a functions library or user-defined function.

      For the steps to access a workspace, see Accessing a Workspace.

    2. On the workspace home page, click User-defined functions.
    3. On the User-defined functions page, perform one of the following actions:
      • Click Create library and select Import.
      • In the list of libraries, click the Actions menu (Actions menu) of the library to which you want to import a function and select Import.
    4. In the import panel that appears, enter the following details:
      • Tenancy OCID: Enter the Oracle Cloud ID of the tenancy that has the exported zip file that you want to import.

        The namespace is a system-generated value based on the tenancy OCID that you enter.

      • OCI region: Select the region in the tenancy.
      • Compartment: Select the compartment with the Object Storage bucket that contains the exported zip file.
      • Bucket: Select the bucket.
      • File name: Enter the file name of the exported library or exported function zip file.

        The file name of the exported library zip file must end with .udflib.zip.

        The file name of the exported function zip file must end with .udf.zip.

    5. Select the action to perform if the exported zip file (source) contains objects with the same name as the objects in the target.

      During an import request, Data Integration uses the identifier values of source and target objects to match objects, and performs the import using the conflict resolution option that you specify.

      • Retain: Retains the objects that exist in the target.

        Source objects (including dependencies) with the same names are not imported to the target.

      • Replace: Replaces the target objects with the source objects.

      • Duplicate: Duplicates the source objects in the target by using the source object names with the strings that you provide for a prefix, suffix, or both.

        • String for prefix: The string is added to the beginning of the source name, for example, string_sourceName
        • String for suffix: The string is added to the end of the source name, for example, sourceName_string

        If you don't add either a prefix or a suffix, a prefix of the following format is added to the beginning of the imported object name in the target: IMPORTPREFIX_1234555

    6. Click Import.

      A notification message appears with a View import requests link. Click the link to monitor the request status on the Export/Import requests page. See Monitoring Export and Import Requests.

  • Use the oci data-integration import-request create command and required parameters to import the functions library or user-defined function:

    oci data-integration import-request create [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference.

  • Run the CreateImportRequest operation with the appropriate request details to import the functions library or user-defined function.