Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Teradata Cookbook
  • Table Of Contents Toc
Teradata Cookbook

Teradata Cookbook

By : Khandelwal, Kasi, Bhamidipati
3.8 (4)
close
close
Teradata Cookbook

Teradata Cookbook

3.8 (4)
By: Khandelwal, Kasi, Bhamidipati

Overview of this book

Teradata is an enterprise software company that develops and sells its eponymous relational database management system (RDBMS), which is considered to be a leading data warehousing solutions and provides data management solutions for analytics. This book will help you get all the practical information you need for the creation and implementation of your data warehousing solution using Teradata. The book begins with recipes on quickly setting up a development environment so you can work with different types of data structuring and manipulation function. You will tackle all problems related to efficient querying, stored procedure searching, and navigation techniques. Additionally, you’ll master various administrative tasks such as user and security management, workload management, high availability, performance tuning, and monitoring. This book is designed to take you through the best practices of performing the real daily tasks of a Teradata DBA, and will help you tackle any problem you might encounter in the process.
Table of Contents (14 chapters)
close
close

Importing data

Let's get the ball rolling now.

We have had Teradata Studio Express and SQLA up and running for a while now. It is time to load data into the Teradata Database.

Now, there are many ways to do this, but, for simplicity, I will be importing data via Excel using the GUI option in Teradata Studio Express. You can copy the table data from Teradata to a data lab just by dragging the source table from the data lab view. The datalab copy wizard helps you through step by step.

A data lab is a separate dedicated work space, also known as a sandbox, sandpit or a test area.

You can get the dataset from various websites; there are tons of websites giving free datasets for analysis.

Getting started

The following are the prerequisites to import the data:

  1. Create a new user, for example, Mike.
  2. Create a new database, for example, TestDb.
  3. Allocate space to the new database.
  4. Grant appropriate access rights to the new database for the new user.

 

  1. Create a table DDL under this database with the same column layout as the import file:

How to do it...

Let's begin with importing data using Studio first and then we will move on to SQLA. The following DDL was used to create the table in the new database. Now load the data from the external file. The following steps allow you to do so:

  1. Go to data explorer. 
  2. Search for the database under which the required table is located:
  1. Explore the database.

 

  1. Right-click on the table, Name | Data | Load Data:
  1. The Wizard will come up; select the source as External File:
  1. On the next screen, just browse to the CSV file you need to load the data from.
  2. Once the data is loaded, you will get a success message. 
  3. To verify the data, right-click on the table, Name | Data | Sample Data; a few rows will pop up, showing that the data has been loaded.

In Express

This one is also as easy as Studio Express. The prerequisites are the same as Studio: 

  1. Select the Import data option from the File tab.
  2. You need to write SQL to start importing the data.
ins into AP.countries (?,?)
  1. ? here defines the number of columns in your file.
  2. Turn off the import function and execute Sel * from the table name to verify the data:
Use different formats to import files from Tools | Options | Export/Import.

To use the CSV file, select Options, as shown in the following screenshot:

Data transfer is a two-way street. We sometimes also have requirements to export the data to a file.

Teradata Studio Express and SQL Assistant both can be used to export data as well.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Teradata Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon