Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Databases
  • SQL
  • MySQL
  • PostgreSQL
  • PL/SQL
  • MongoDB
  • SQL Cheat Sheet
  • SQL Interview Questions
  • MySQL Interview Questions
  • PL/SQL Interview Questions
  • Learn SQL and Database
Open In App
Next Article:
How to Connect Teradata Using SAS in SQL?
Next article icon

How to Connect Teradata Using SAS in SQL?

Last Updated : 08 Feb, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

SAS is a popular statistical software that provides a powerful suite of tools for data management, analytics, and reporting. In this blog post, we will show you how to connect to Teradata using SAS in SQL. Teradata is a high-performance, relational database management system that is widely used for data warehousing and business intelligence applications.

Install the Teradata ODBC Driver

The first step to connecting to Teradata using SAS is to install the Teradata ODBC driver. This driver provides a bridge between SAS and Teradata, allowing you to access Teradata data from SAS. You can download the Teradata ODBC driver from the Teradata website. Follow the instructions on the website to install the driver on your computer.

Create a System Data Source Name (DSN)

Once the Teradata ODBC driver is installed, you need to create a System Data Source Name (DSN). A DSN is a database connection profile that contains all the information SAS needs to connect to a Teradata database. To create a DSN, follow these steps:

  • Go to Start > Control Panel > Administrative Tools > Data Sources (ODBC).
  • Click the System DSN tab.
  • Click the Add button to create a new DSN.
  • Select the Teradata ODBC Driver and click Finish.
  • In the Teradata ODBC Driver Setup window, enter a name for the DSN in the Data Source Name field.
  • Enter the Teradata database server name or IP address in the Host field.
  • Enter your Teradata username and password in the User ID and Password fields.
  • Click OK to save the DSN.

Connect to Teradata in SAS

With the Teradata ODBC driver installed and the DSN created, you are now ready to connect to Teradata in SAS. To do this, follow these steps:

1. Launch SAS and open a new program.
2. Type the following code to connect to Teradata using the ODBC connection.

libname tera odbc datasrc=tera_dsn;

Replace "tera_dsn" with the name of the DSN you created.

1. Run the code by clicking the Run button or pressing F9. SAS will now connect to the Teradata database and assign it the name "tera".

Query Teradata Data in SAS

With the connection to Teradata established, you can now query Teradata data in SAS. To do this, simply use the SAS SQL procedure to issue SQL statements against the Teradata database. For example, to query the "customers" table in Teradata, you would use the following code:

proc sql;
select * from tera.customers;
quit;

This code uses the SAS SQL procedure to query the "customers" table in the Teradata database and return the results to SAS.

In conclusion, connecting to Teradata using SAS in SQL is a straightforward process that requires a few simple steps. With the Teradata ODBC driver installed and a DSN created, you can use SAS to query Teradata data and perform data analysis, reporting, and more. Whether you are a data analyst, data scientist, or business intelligence professional, Teradata, and SAS provide a powerful combination for managing and analyzing large amounts of data.


Next Article
How to Connect Teradata Using SAS in SQL?

M

mdashifreza111
Improve
Article Tags :
  • SQL

Similar Reads

    How to Create Volatile Table in Teradata?
    Volatile tables are as same as simple tables but with a small difference i.e. they are volatile in nature. Like a simple table, the volatile table is also formed by the user and can only be used until the user is logged into. Once the user is logged off or disconnects, the Teradata manager automatic
    2 min read
    How to create SQL table using DBI library in R
    DBI library in R programming is used for interacting with different types of database systems such as MySQL for different types of professional work like data analysis using R language. We can easily connect to the database, run queries and retrieve results from the database in the R environment wit
    3 min read
    How to Connect R to SQL Server With RODBC
    R programming language is used for statistical computing. In this article, we will learn how to connect an SQL server with RODBC. What is DBMS?DBMS refers to Database Management System. It is a software for storing and retrieving the data. There are various types of DBMS they are. Hierarchical Datab
    8 min read
    How to Get the Type of Columns in SQL
    In SQL, the types of columns in a database table play a fundamental role in data management and query execution. Each column is designed to store specific types of data, such as numbers, text, dates, or binary data. Understanding these column types is essential for effective database design, query o
    4 min read
    How to Move a Table from SAS to Teradata SQL Assistant?
    Organizations looking to optimize their analytical talents need to be capable of moving facts among structures without difficulty inside the facts-centric world these days. Data migration from SAS, a pinnacle analytics platform, to Teradata SQL Assistant, a powerful device for Teradata database cont
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences