Skip to main content

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

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.

Note

You can find your IP address from WhatIsMyIp.com website. Take note of the IPv4 address.

IP whitelisting

Your environment card should show Public internet access now.

Public internet card view

From OVERVIEW tab, copy:

  • Public IP and
  • Open Analytics Endpoint

These values are required to access VantageCloud Lake from the Docker.

Environment Overview page

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:

Edit vars.json file

To connect Jupyter notebooks with VantageCloud Lake, you need to edit vars.json file and provide:

VariableValue
"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
info

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.

info

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:

Note

For Windows, run the docker command in PowerShell.

docker logs

Click on the URL in docker logs to open Jupyter notebook in your browser.

Jupyter Notebook

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. +

Environment setup Jupyter Notebook

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.

Further reading

Also of interest