Run Teradata Jupyter Notebook Demos for VantageCloud Lake in Docker
Overview
In this how-to we will go through the steps for connecting to Teradata VantageCloud Lake and run demos from a Jupyter notebook in Docker.
Prerequisites
- Docker Desktop installed
- Git installed
- Required to download git repo from https://github.com/Teradata/lake-demos.git
- A Teradata VantageCloud Lake account login
- Organization URL and login details from Teradata welcome letter
- IDE of your choice
Create VantageCloud Lake environment
Follow the instructions from the VantageCloud Lake getting started to create your own environment.
Once created, go to SETTINGS tab and provide your public IP address to access the environment.
You can find your IP address from WhatIsMyIp.com website. Take note of the IPv4 address.
Your environment card should show Public internet access now.
From OVERVIEW tab, copy:
- Public IP and
- Open Analytics Endpoint
These values are required to access VantageCloud Lake from the Docker.
Clone VantageCloud Lake Demo repository
Clone VantageCloud Lake Demo repository in your local machine:
The repository contains different files and folders, the important ones are:
- Jupyter Notebooks
- vars.json file
Edit vars.json file
To connect Jupyter notebooks with VantageCloud Lake, you need to edit vars.json file and provide:
Variable | Value |
---|---|
"host" | Public IP value from OVERVIEW section (see above) |
"UES_URI" | Open Analytics Endpoint value from OVERVIEW section (see above) |
"dbc" | The master password of your VantageCloud Lake environment |
In the sample vars.json, the passwords of all users are defaulted to "password", this is just for illustration purposes. You should change all of these password fields to strong passwords, secure them as necessary, and follow other password management best practices.
Mount files within Docker
To run VantageCloud Lake demos, we need the Teradata Jupyter Extensions for Docker. The extensions provide the SQL ipython kernel, utilities to manage connections to Teradata, and the database object explorer to make you productive while interacting with the Teradata database.
Make sure that you are running all the commands in the same folder where you have cloned the demo repository.
Start a container and bind it to the existing lake-demos directory. Choose the appropriate command based on your operating system:
For Windows, run the docker command in PowerShell.
- Windows
- MacOS
- Linux
Click on the URL in docker logs to open Jupyter notebook in your browser.
Run demos
Open and execute all the cells in 0_Demo_Environment_Setup.ipynb to setup your environment, followed by 1_Demo_Setup_Base_Data.ipynb to load the base data required for the demos. +
To learn more about the demo notebooks, go to Teradata Lake demos page on GitHub.
Summary
In this quick start we learned how to run Teradata VantageCloud Lake demos from Jupyter Notebook in Docker.