Installing Greenplum Loader

This section contains information for installing the Greenplum data loading programs on your Windows machine and for enabling Greenplum Database to accept remote client connections:

See the Greenplum Database Release Notes for the list of currently supported platforms for the Load Tools.

Parent topic: Greenplum Database Load Tools for Windows

Installing Python

The Greenplum loader program (gpload.py) for Windows requires Python 2.5.4 (32-bit version) to also be installed on your machine. If you do not have an installation of Python, you can get one from https://www.python.org.

Note: The 64-bit version of Python is not compatible with the Greenplum loader program for Windows.

To install Python

  1. Download the Python 2.5.4 installer for Windows from https://www.python.org/downloads/.
  2. Locate, then double-click on the python Load Tools for Windows-2.5.4.x.msi package to launch the installer.
  3. Select Install for all users and click Next.
  4. By default, Python will be installed into C:\Pythonxx. Click Up or New if you want to choose another location. Click Next.
  5. Click Next to install the selected Python components.
  6. Click Finish to complete your installation.

Running the Loader Installer

The Greenplum loader installer installs the following loader programs:

To install Greenplum loader

  1. Download the greenplum-clients-<version>-WinXP-x86_32.msi package from VMware Tanzu Network.
  2. Follow the instructions in Verifying the Greenplum Database Software Download to verify the integrity of the Greenplum Loaders software.
  3. Double-click on the greenplum-clients-<version>-WinXP-x86_32.msi package to launch the installer.
  4. Click Next on the Welcome screen.
  5. Click I Agree on the License Agreement screen.
  6. By default, Greenplum loader will be installed into greenplum-db-<version>. Click Browse to choose another location.
  7. Click Next.
  8. Click Install to begin the installation.
  9. Click Finish to exit the installer.

About Your Installation

Your Greenplum loader installation contains the following files and directories:

  • bin — loader command-line utilities (gpload.py and gpfdist.exe)
  • bin/lib — additional Python libraries needed by gpload.py
  • greenplum_loaders_path.bat — sets the required environment variables

Configuring Greenplum Loader

Greenplum provides a batch program (greenplum_loaders_path.bat) to set the required environment settings for Greenplum loader (located in greenplum-db-<version> by default).

To set the required environment settings

  1. Open a Windows command prompt (Start > Run and type cmd).

  2. At the command prompt, go to the directory where you installed Greenplum loader. For example:

    1. cd \"Program Files"\Greenplum\greenplum-loaders-<version>
    2. dir
  3. Execute the greenplum_loaders_path.bat program:

    1. greenplum_loaders_path.bat
  4. Verify that you can execute the gpload.py program:

    1. gpload.py -?

The loader command-line tools also require several connection parameters in order to be able to connect to a Greenplum database. In order to save some typing on the command-line, you can optionally create the following environment variables in your Windows Control Panel.

  • PGDATABASE — The name of the default Greenplum database to connect to.
  • PGHOST — The Greenplum Database master host name or IP address.
  • PGPORT — The port number that the Greenplum master instance (postmaster process) is running on.
  • PGUSER — The default database role name to use for login.

To add a new user environment variable on Windows XP

  1. In Windows Explorer, go to C:\Control Panel.

  2. Double-click the System icon.

  3. On the Advanced tab, click Environment Variables (bottom).

  4. Click New.

  5. Define the new environment variable. For example:

    Installing Greenplum Loader - 图1

  6. Click OK.

Enabling Greenplum Database for Remote Client Connections

In order for Greenplum Database to be able to accept remote client connections, you must configure your Greenplum Database master so that connections are allowed from the client hosts and database users that will be connecting to Greenplum Database.

To enable remote client connections

  1. Make sure that the pg_hba.conf file of the Greenplum Database master is correctly configured to allow connections from the users to the database(s) using the authentication method you want. For details, see “Editing the pg_hba.conf File” in the Greenplum Database Administration Guide, and also see the Greenplum Database Security Configuration Guide.

    Make sure the authentication method you choose is supported by the client tool you are using.

  2. If you edited pg_hba.conf file, the change requires a server reload (using the gpstop -u command) to take effect.

  3. Make sure that the databases and roles you are using to connect exist in the system and that the roles have the correct priviliges to the database objects.