Configuring the Network to Import and Export Data

Importing and Exporting Data

Vertica imports and exports data from one Vertica cluster to another across a private network using the COPY FROM VERTICA statement and the EXPORT TO VERTICA statement. By default, the Vertica cluster uses the private network for importing and exporting data.

To use the public network, you must configure the system by changing the export address. You must have only one network configuration for each server. You must configure the system to use the public network by:

  • Identifying the IP addresses of the nodes or clusters on the public network.
  • Configuring the database or individual nodes for import/export.

Network IP Addresses

The Vertica cluster hosts use two network IP addresses:

  • A private address for communication between the cluster hosts. The private network, such as a cluster interconnect, is used exclusively for internal cluster communications. This network must be the same subnet in the cluster. The IP addresses for the private network interfaces must be assigned statically. No external traffic should be allowed over the private cluster network.
  • A public IP address for communication for client connections. The public network is used for database client or application connectivity. Vertica has no rigid requirements for public network configuration, but we reccomend that you assign static IP addresses for the public network interfaces.

Use both the private and the public addresses to isolate traffic.

The Node Address and the Export Address

Each node has a node address and an export address:

  • The node address is the host address of the node on the private network. It is the internal database address of Vertica.
  • The export address is the IP address of the node on the public network. It is used for import/export.

By default, the node address and the export address are the same.

Changing the Export Address

To import data and export data from one Vertica cluster to another Vertica cluster, you may need to change the export address. Changing the export address allows the two Vertica clusters to exchange data using the public network IP address. This table explains when you should change the export address to the public address.

  Change the Export Address?

Clusters in Same Subnet

No, if you want to connect one Vertica cluster with another cluster.

Clusters in Different Subnets

Yes, if you want to connect one Vertica cluster with another cluster.

Clusters in Different Subnets

No, if you do not want to connect one Vertica cluster with another cluster.

Configuring the System to Use the Public Network

To use the public network for importing data and exporting data between Vertica databases, you must configure the system to use the public network. Vertica must know the IP addresses of the nodes of the clusters on the public network for importing data and exporting data. The system defines your network IP addresses using one of the following configurations:

  • The public and private network IP addresses on the same subnet.
  • The public and private network IP addresses on different subnets.

In the following figure, the client connects to the Vertica database using the public network. The Vertica nodes communicate with each other using the private network. The public and the private network are on different subnets of the Vertica cluster.

Are the Node Address and the Export Address Same?

By default, the node address and the export address are same. In the next example, the node address and the export address are the same. If you want to import data and export data between clusters in different network subnets, you must change the export addresses.

=> SELECT node_name, node_address, export_address FROM nodes;
     node_name     | node_address    | export_address
-------------------+-----------------+----------------
v_VMartDB_node0001 | 192.168.100.101 | 192.168.100.101
v_VMartDB_node0002 | 192.168.100.102 | 192.168.100.102
v_VMartDB_node0003 | 192.168.100.103 | 192.168.100.103
v_VMartDB_node0004 | 192.168.100.104 | 192.168.100.104
(4 rows)

How to Change the Export Address

To change the export address, follow these steps:

  1. Create a subnet for importing and exporting data between Vertica clusters. The CREATE SUBNET statement identifies the public network IP addresses residing on the same subnet.
=> CREATE SUBNET kv_subnet with '10.10.10.0';
  1. Alter the database to specify the subnet name of a public network for import/export.
=> ALTER DATABASE VMartDB EXPORT ON kv_subnet;
  1. Create network interfaces for importing and exporting data from individual nodes to other Vertica clusters. The CREATE NETWORK INTERFACE statement identifies the public network IP addresses residing on multiple subnets.
=> CREATE NETWORK INTERFACE kv_node1 on v_VMartDB_node0001 with '10.10.10.1';
=> CREATE NETWORK INTERFACE kv_node2 on v_VMartDB_node0002 with '10.10.10.2';
=> CREATE NETWORK INTERFACE kv_node3 on v_VMartDB_node0003 with '10.10.10.3';
=> CREATE NETWORK INTERFACE kv_node4 on v_VMartDB_node0004 with '10.10.10.4';

For users on Amazon Web Services (AWS) or using Network Address Translation (NAT), see Vertica on Amazon Web Services.

  1. Alter the node settings to change the export address. When used with the EXPORT ON clause, the ALTER NODE specifies the network interface of the public network on individual nodes for importing and exporting data.
=> ALTER NODE v_VMartDB_node0001 export on kv_node1;
=> ALTER NODE v_VMartDB_node0002 export on kv_node2;
=> ALTER NODE v_VMartDB_node0003 export on kv_node3;
=> ALTER NODE v_VMartDB_node0004 export on kv_node4;
  1. Verify if the node address and the export address are different on different network subnets of the Vertica cluster.
=> SELECT node_name, node_address, export_address FROM nodes;
     node_name     | node_address    | export_address
-------------------+-----------------+----------------
v_VMartDB_node0001 | 192.168.100.101 | 10.10.10.1
v_VMartDB_node0002 | 192.168.100.102 | 10.10.10.2
v_VMartDB_node0003 | 192.168.100.103 | 10.10.10.3
v_VMartDB_node0004 | 192.168.100.104 | 10.10.10.4 

Note that creating a network interface and altering the node settings to change the export address takes precedence over creating a subnet and altering the database for import/export.

For more information about the database network settings, see Identify the Public Network to  Vertica in the Vertica documentation.