Set Up Data Custom Code SDK (Beta)

Data Custom Code SDK is a toolkit that you can use to develop and test custom Python scripts locally and then deploy them to Data 360 for execution. The SDK provides dedicated libraries, a command-line interface (CLI), and optimized workflows that ensure a secure and productive development experience.

The SDK uses OAuth and an external client app to connect to your Data 360 instance from your local machine. With this connection, you can read Data 360 objects directly for local testing, giving you the opportunity to catch errors early and verify your code.

Code extension is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Beta Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.

Edition Table
Available in: Developer, Enterprise, Performance, and Unlimited Editions. See Data 360 edition availability.
Permission Sets Needed
To set up the SDK:Permission set:
  • Data Cloud Architect

Install this software on your local machine.

  • Operating System: macOS or Linux
  • Python 3.11: We recommend using pyenv to install Python 3.11
  • Azul Zulu OpenJDK 17.x
  • Docker Desktop
  1. Access a Data 360 sandbox with appropriate permission sets. If you don't have a sandbox, create one. See Create a Data 360 Sandbox.
  2. Set up an external client app and obtain the required authentication values. See Set Up an External Client App for Data Custom Code SDK.

You need these values for SDK set up.

  • login_url: Data 360 Sandbox login URL
  • client_id: Consumer Key of your external client app
  • client_secret: Consumer Secret of your external client app
  • refresh_token: The refresh token obtained from the OAuth flow
  • core_token (optional): The access token (also called core token)
  1. Create a project directory and navigate to it.

    • <project_dir>: The name of your project directory
  2. Create and activate a Python virtual environment.

    • <venv_dir>: Name of your virtual environment directory (commonly .venv)
  3. Install the SDK package from PyPI with pip.

    Your local environment now has:

  • The SDK and all its dependencies installed in your Python environment
  • Access to the datacustomcode command-line tool for scanning, running, and deploying custom code
  • All necessary Python modules available for import in your scripts
  1. Verify the SDK installation.

    If the command returns a version number, the SDK is installed correctly.

  2. Configure datacustomcode CLI for your Data 360 environment.

    When prompted, enter these details.

    • <login_url>: Data 360 Sandbox login URL
    • <client_id>: Consumer Key of your external client app
    • <client_secret>: Consumer Secret of your external client app
    • <refresh_token>: The refresh token obtained from the OAuth flow
    • <core_token> (optional): The access token (also called core token) from the OAuth flow response

    Data 360 configuration is saved locally for datacustomcode CLI to authenticate and interact with Data 360 as required.

    Running the datacustomcode configure command is a one-time setup per environment or profile. Rerun this command only if your credentials or environment details change, or if you want to set up a new profile.

  3. Create an SDK project in the folder where you set up the SDK.

    An SDK project sets up the required directory structure, configuration files, and dependencies for writing, testing, and deploying custom code with the SDK.

    The command creates this folder structure.

    Directory or FileDescription
    DockerfileUsed for containerized builds and deployments. Don’t modify this file.
    requirements.txtList your script’s Python dependencies here.
    requirements-dev.txtDevelopment environment dependencies. Don’t modify this file.
    payload/Contains your main code and configuration for deployment
    payload/config.jsonData 360 deployment configuration
    payload/entrypoint.pyMain script where you write your batch data transform logic
    examples/Example scripts and sample data
    examples/employee_hierarchy/An example script to build a Directed Acyclic Graph (DAG) based on employee hierarchy. To use, upload employee_data.csv into a new Employee DLO, create an Employee_Hierarchy DLO, and copy entrypoint.py contents into payload/entrypoint.py. Then run locally and deploy.
    jupyterlab.shScript to start JupyterLab for interactive development
    .devcontainer/Configuration for VS Code Dev Containers
    README.mdProject overview and instructions
  4. If needed, go to your SDK project directory.