> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exploratory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# HP Vertica Database Data Import

You can quickly import data from your HP Vertica Database into Exploratory.

## 1. Create a Connection to use

Create a connection following [this instruction](https://docs.exploratory.io/en/import/connection.html.md).

## 2. Open HP Vertica Import dialog

Click '+' button next to 'Data Frames' and select 'Import Database Data'.

![](https://mintcdn.com/exploratory-inc/w_BKR9NcFwjvyQXp/en/import/images/import-db.png?fit=max\&auto=format\&n=w_BKR9NcFwjvyQXp\&q=85\&s=1a071355630e9c457001bd8e7963160f)

Click HP Vertica to select.

![](https://mintcdn.com/exploratory-inc/w_BKR9NcFwjvyQXp/en/import/images/hp-vertica-dialog.png?fit=max\&auto=format\&n=w_BKR9NcFwjvyQXp\&q=85\&s=d9d9e52da334311c076a60a027dd6797)

## 3. Import

1. Put data frame name.

2. Select connection from left dialog box.

3. Write a query in the input field.

4. Click "Preview" button. Then you will see the preview of the data.

5. Click "Import" button.

![](https://mintcdn.com/exploratory-inc/w_BKR9NcFwjvyQXp/en/import/images/import-hp-vertica-dialog.png?fit=max\&auto=format\&n=w_BKR9NcFwjvyQXp\&q=85\&s=5798378928f9276f9e33dd0daeea93f5)

If it looks ok, then you can click 'Import' to import the data into Exploratory.

## 4. Using Variables in SQL

First, create a custom R script.

![](https://mintcdn.com/exploratory-inc/m5S7Pfr13E6f1q8Y/en/import/images/add_script.png?fit=max\&auto=format\&n=m5S7Pfr13E6f1q8Y\&q=85\&s=7bd52a203e4cc6a11411c8d78140958a)

Second, define a variable in the R script and save.

![](https://mintcdn.com/exploratory-inc/t8wulpy3B474-b7T/en/import/images/set_variables.png?fit=max\&auto=format\&n=t8wulpy3B474-b7T\&q=85\&s=c31cb64b80ed7c0fcdd204f82491c7e2)

```
cutoff_date <- "\'2016-01-15\'"
```

Note that the ‘\’ (backslash) symbols are used to escape the single quotes, which are required to be used for characters in SQL queries.

Finally, you can use @{} to surround a variable name inside the query like below.

```
select *
from airline_2016_01
where fl_date > @{cutoff_date}
```

Here's a [blog post](https://blog.exploratory.io/using-variables-in-sql-query-2740924d9f20#.bdcn5v68x) for more detail.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.