Deploy a Custom Script to Data 360 Sandbox by Using CLI

The deployment process packages your Python script, its dependencies, and Data 360 configuration, and then uploads them to Data 360.

DMO-DMO Transform Limitation: If your script performs DMO-DMO transforms (transforms that read from and write to data model objects), sf data-code-extension script deploy doesn’t work as intended. Use the UI deployment instead. See Deploy a Custom Script to Data 360 Sandbox by Using UI.

Important

Edition Table
Available in: Developer, Enterprise, Performance, and Unlimited Editions. See Data 360 edition availability.
User Permissions Needed
To deploy a custom script and invoke code extension by creating a batch data transform:Permission set:
  • Data Cloud Architect

Prerequisites 


Steps to Deploy Your Custom Script and Invoke Code Extension by Creating a Batch Data Transform 

  1. Open a terminal, and go to the root of your code extension script package (the folder that contains payload/).

    1cd <path-to-root-folder-of-customscript>
  2. Make sure that you’re logged in to your sandbox.

    1sf org display --target-org <org_alias>
  3. Deploy your code extension script.

    1sf data-code-extension script deploy --name <deployment_name> --package-version <package_version> --description "<description>" --package-dir ./payload --target-org <org_alias> --cpu-size [CPU_L|CPU_XL|CPU_2XL|CPU_4XL]
  • --name <deployment_name> (required): Name for your code extension deployment and batch data transform.

  • --package-version <package_version> (required): Semantic version for the package (for example 1.0.0).

  • --description "<description>" (required): Short description of the deployment.

  • --package-dir ./payload (required): Directory that contains your packaged script (typically ./payload under the package root).

  • --target-org <org_alias> (required): Org username or alias.

  • --cpu-size (optional): CPU size for the deployment. Available options are CPU_L, CPU_XL, CPU_2XL, and CPU_4XL. The default is CPU_XL. Larger sizes provide more vCPUs and memory but consume more credits.

  • --network (optional): Network setting for packages that include Jupyter notebooks (for example host for host network mode).

    Example:

    1sf data-code-extension script deploy --name my_custom_script --package-version 1.0.0 --description "Uppercase Account Description transformation" --package-dir ./payload --target-org myorg --cpu-size CPU_L
  1. Confirm that the code deployment is successful. See Deployment Details.

Next Step