Previous Topic: MPP Mode |
Next Topic: Creating Partitioned Tables |
Setting Up the MPP Environment
Before creating an initial partitioned table on the head node, the remote tables that will act as partitions must already exist and have equivalent table structures. Initially, these tables do not have to contain any data, as the SAND Data Loader can be used to automatically partition and load data after the partitioned table has been created. Users who decide to partition the data using their own means should be aware that SAND supports the following partitioning strategies:
The partitioning method is specified when the partitioned table is defined, and is stored in the table's metadata. For subsequent load operations on the partitioned table, the SAND Data Loader will know how to divide the data among the nodes from this metadata information. If the remote table partitions will be pre-loaded, it is important that the partitioning strategy used corresponds to the one specified when the partitioned table is created.
Each remote table partition must have an associated linked table on the head node. When the partitioned table is defined, its remote table partitions are specified by referencing the linked tables. For this reason, the head node's nucleus.ini file must contain a separate CONNECTION section with the host and port information for each remote database in the MPP environment. One or more connection objects will be defined on these nucleus.ini CONNECTION sections using CREATE CONNECTION commands, and these connection objects will in turn be used to define the linked tables through CREATE TABLE...WITH CONNECTION commands.
To summarize the MPP preparatory steps:
- Create and optionally load the remote tables that will serve as partitions for the partitioned table on the head node.
- Add a CONNECTION section to the head node nucleus.ini file for each database where the remote tables reside.
- Using CREATE CONNECTION commands on the head node, define at least one connection object for each remote database.
- Using CREATE TABLE...WITH CONNECTION commands on the head node, specifying the connection objects defined in the previous step, create a linked table for each remote table.