You can use the sandbox container to develop various functions by using python and
connecting to a Presto (Java) engine.
watsonx.data Developer
edition
About this task
To work with the sandbox container, complete the following steps:
Procedure
- Set the variable "LH_SANDBOX_DIR" with the folder path. For example:
export
LH_SANDBOX_DIR=/home/jmouse/mysandbox
. For more information, see on how to setup sandbox
directory, see Sandbox directory.
export LH_SANDBOX_DIR=<folder_path>
- Run the following command to start the sandbox environment.
bin/dev-sandbox
Note: The environment variables are set inside the sandbox container to help you with scripting and
to avoid hardcoding.
- Run the following commands to get the details of the engine host and engine
password:
- Use sandbox to run python file from the sandbox directory by using the command
python3 <path of python file to be run>
as shown in the following example where
'sample.py' is the python file:
python3 /home/jmouse/mysandbox/sample.py
Note: Type 'exit' to exit from the sandbox container.