Skip to main content Skip to complementary content

Testing your Pivotal Greenplum Configuration and Environment

Qlik Replicate relies on the proper functioning of Pivotal Greenplum's gpfdist program on the computer with Qlik Replicate (the local computer). gpfdist is a simple Web server program with special performance customizing for concurrent access from Pivotal Greenplum database segment nodes to data files on the local computer.

Because gpfdist is a Web server program and because it needs to be accessible from the Pivotal Greenplum database segment nodes, there are some networking configuration settings that must be in place to allow for this access. This is documented in the EMC Greenplum database Administration Guide.

The following sections provide a simple test that verifies the proper configuration of the Pivotal Greenplum database and the local software installation. You can run this test before installing any Qlik software on your local computer. This test must be completed successfully to ensure that Qlik Replicate can work with a Pivotal Greenplum database.

Collect Connection Information

The following is the information required for this test. You should write down the information for your system to use later in this test.

  • <<Pivotal Greenplum-host>>: The Pivotal Greenplum database host name (master).
  • <<Pivotal Greenplum-port>>: The Pivotal Greenplum database port number (master). In many cases the port number is 5432
  • <<Pivotal Greenplum-user>>: The username that is used to connect to the Pivotal Greenplum database. This user must have permission to create an external table.
  • <<Pivotal Greenplum-password>>: The password of the selected Pivotal Greenplum user.
  • <<Pivotal Greenplum-database>>: The Pivotal Greenplum database name where the test is created.
  • <<Pivotal Greenplum-host>>: The local computer name as seen from the Pivotal Greenplum segment nodes.
  • <<gpfdist-port>>: The port number where the gpfdist program is listening.

Create a Test Input File

Create a text file called greenplum_test123.txt with the following content:

Scott,Greenplum

Tiger,Woods

Create an SQL Script File

Create a text file called greenplum_test123.sql with the following content, replacing the <<.fgf.>> tokens with the information for your system that you wrote down in step 1:

CREATE EXTERNAL TABLE greenplum_test123 ( name text, descr text )

LOCATION ('gpfdist://<<gpfdist-host>>:<<gpfdist-port>>/greenplum_test123.txt')

FORMAT 'TEXT' (DELIMITER ',');

SELECT * FROM greenplum_test123;

DROP EXTERNAL TABLE greenplum_test123;

Start gpfdist

Open a command shell and change the current directory to the directory where you created the Test Input File and the SQL Script File. Then start the gpfdist program with the following command:

$ gpfdist -v -p <<gpfdist-port>> -d .

Run the SQL Script

Run the SQL script that you created with the following command:

$ psql -d <<Pivotal Greenplum-database>> -h <<Pivotal Greenplum-host>> -p <<Pivotal Greenplum-port>> -U <<Pivotal Greenplum-user>> -f greenplum_test123.sql

If the script runs successfully, the following is displayed:

CREATE EXTERNAL TABLE

name | descr

-------+-----------

Scott | Pivotal Greenplum

Tiger | Woods

(2 rows)

DROP EXTERNAL TABLE

If the script is not successful, you will get an output that is similar to the following example:

CREATE EXTERNAL TABLE

psql:greenplum_test123.sql:4: ERROR: connection with gpfdist failed for gpfdist://atturepl:18080/greenplum_test123.txt. effective url: http://192.168.165.12:

18080/greenplum_test123.txt. error code = 110 (Connection timed out) (seg0 slice1 greenplum421.acme.local:40000 pid=31364)

DROP EXTERNAL TABLE

In the example above, the problem was that a firewall on the local computer prevented the Pivotal Greenplum database segment from reaching the local gpfdist instance.

Any error that occurs must be resolved before using Qlik Replicate with EMC Pivotal Greenplum. Once you resolve the error, you should run this test again to ensure that you can work with the Pivotal Greenplum database.

For information about what to do if this test fails, see Troubleshooting gpfdist issues.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!