How to connect to teradata using R

This recipe helps you connect to teradata using R

Recipe Objective

How to connect to Teradata using R

Teradata is a type of RDBMS — Relational Database Management System which is used for storing and handling larger volumes of data. Hence, Teradata supports the popular Structured Query Language (SQL) for interacting with databases. This recipe demonstrates an example of how to connect to tera data using R.

Step 1 - Set up a DSN

Initially, follow the following procedure for setting up a DSN -> Control Panel-> Administrative tools -> Data Sources (ODBC) -> User DSN tab -> click add-> select Teradata driver and click finish. A dialog box appears with necessary fields to fill up like : Name : Any name for your connection Username : the username you want to connect for your database Password : password used to connect to databases.

Step 2 - Install the necessary packages

install.packages("RODBC") library(RODBC)

Step 2 - Create a connection

teradata_conn <- odbcConnect("TeraDataRConnection", user_id="username",psswd="password")

Step 3 - Check the connection

list_tables <- sqlTables(teradata_conn,tableType="TABLE") {"mode":"full","isActive":false}

What Users are saying..

profile image

Savvy Sahai

Data Science Intern, Capgemini
linkedin profile url

As a student looking to break into the field of data engineering and data science, one can get really confused as to which path to take. Very few ways to do it are Google, YouTube, etc. I was one of... Read More

Relevant Projects

Build a Speech-Text Transcriptor with Nvidia Quartznet Model
In this Deep Learning Project, you will leverage transfer learning from Nvidia QuartzNet pre-trained models to develop a speech-to-text transcriptor.

Linear Regression Model Project in Python for Beginners Part 1
Machine Learning Linear Regression Project in Python to build a simple linear regression model and master the fundamentals of regression for beginners.

Build Customer Propensity to Purchase Model in Python
In this machine learning project, you will learn to build a machine learning model to estimate customer propensity to purchase.

Mastering A/B Testing: A Practical Guide for Production
In this A/B Testing for Machine Learning Project, you will gain hands-on experience in conducting A/B tests, analyzing statistical significance, and understanding the challenges of building a solution for A/B testing in a production environment.

PyTorch Project to Build a GAN Model on MNIST Dataset
In this deep learning project, you will learn how to build a GAN Model on MNIST Dataset for generating new images of handwritten digits.

Learn to Build a Siamese Neural Network for Image Similarity
In this Deep Learning Project, you will learn how to build a siamese neural network with Keras and Tensorflow for Image Similarity.

NLP Project for Beginners on Text Processing and Classification
This Project Explains the Basic Text Preprocessing and How to Build a Classification Model in Python

Time Series Forecasting Project-Building ARIMA Model in Python
Build a time series ARIMA model in Python to forecast the use of arrival rate density to support staffing decisions at call centres.

Ecommerce product reviews - Pairwise ranking and sentiment analysis
This project analyzes a dataset containing ecommerce product reviews. The goal is to use machine learning models to perform sentiment analysis on product reviews and rank them based on relevance. Reviews play a key role in product recommendation systems.

Avocado Machine Learning Project Python for Price Prediction
In this ML Project, you will use the Avocado dataset to build a machine learning model to predict the average price of avocado which is continuous in nature based on region and varieties of avocado.