Book Image

HP Vertica Essentials

By : Rishabh Agrawal
Book Image

HP Vertica Essentials

By: Rishabh Agrawal

Overview of this book

<p>With the rise of Massively Parallel Processing (MPP) and NewSQL databases, many users are confused about which MPP technology to opt for. Today, HP Vertica is gaining a lot of traction as a major MPP technology. Vertica's distributed architecture allows fast query processing, and it is a highly fault-tolerant architecture, thus making it one of the most sought-after MPP databases today.</p> <p>HP Vertica Essentials will help you to learn day-to-day administration activities in a step-by-step format. You will start by learning how to install Vertica, followed by its management and monitoring. You will learn about the different backup and restore techniques, including the concept of projections in Vertica. Finally, you will explore the various techniques to improve performance and bulk loading in Vertica. By the end of this book, you will be able to install, manage, and monitor Vertica efficiently.</p>
Table of Contents (13 chapters)

Using the COPY command


The COPY command can only be used by a superuser. The COPY command provides the flexibility to load and manage data with the help of the following optional parameters:

  • Format and arrangement of the incoming data

  • Metadata about the data load

  • Data transformation

  • Error handling

The encoding of the data to be loaded should be in the UTF-8 format. It is advisable to check the encoding of the file before loading the data. If the data present is not in the UTF-8 format, then we can convert it using the following Linux/UNIX iconv command:

iconv -f encoding-of-old-file -t encoding-of-new-file old-file.txt > newfile.txt

This can be illustrated with the help of the following example:

> iconv –f WINDOWS-1251 –t UTF-8 data.txt > data_new.txt

You can also check for the various formats supported by iconv using iconv -l.

It should also be noted that data should be segregated with proper delimiter characters. Before loading the data, it should also be checked that no CHAR(N) or...