Creating a sandbox directory

After installing ibm-lh-client package, you can introduce a directory for your own use with the containerized utilities. Such a sandbox directory can include your SQL files, python scripts and other files that can be referenced when you use the utilities.

watsonx.data Developer edition

watsonx.data on IBM Software Hub

watsonx.data on IBM Cloud®

To mount your own directory, set the LH_SANDBOX_DIR environment variable to the sandbox directory path and create a sample SQL file or python script to be run in that directory. The following steps describe the setup of sandbox directory.

  • Create the sandbox directory. For example:
    mkdir /home/jmouse/mysandbox
  • Set the environment variable to the sandbox path created in the previous step. For example:
    export LH_SANDBOX_DIR=/home/jmouse/mysandbox
  • You can now run the python scripts or SQL files in that directory using ibm-lh-client package utilities like presto-cli and presto-run.
Note: It is advised that you create a new directory that is solely meant for sharing files inside these containers. Avoid selecting directories such as your HOME as a Sandbox directory. Mounting directories such as your HOME can cause file permission changes on existing files on some operating systems or with specific container runtime.