If you have data stored in a PostgreSQL database, you can connect using the PostgreSQL Connector Client. To install the client, you need to:
- Download and install the PostgreSQL Connector Client installer (.msi) file from the PostgreSQL Database Download page.
Make sure you select the correct connector to match your 32-bit or 64-bit WPS Analytics installation.
- On the same device as WPS Analytics is installed, run the PostgreSQL installer (.msi).
- Add the PostgreSQL Connector Client installation folder containing files lib*.dll's to the system PATH variable, for example C:\Program Files\ PostgreSQL version\bin where version is the version of the PostgreSQL Connector Client you have downloaded. The procedure is as follows:
- In the Windows Control Panel select System or Security. Select System and click Advanced System Settings.
- In the Advanced tab, click Environment Variables.
- Select the PATH entry in the System Variables and then click Edit.
- In the Edit environment variable dialog box, click New and enter the installation folder path.
- Click OK to save the changes, and close the remaining system and security dialogs by clicking OK each time.
- Once the client has been installed, test the database connectivity with the following SAS language program:
LIBNAME DATASRC POSTGRESQL USER=user-name PASSWORD=password
PROC DATASETS LIBRARY=DATASRC;
- In the LIBNAME statement, replace user-name and password with your user name and password for the remote-id server, and replace dbase with the name of the PostgreSQL database.
- The DATASETS procedure returns the names of all tables in the selected database; for databases with large numbers of tables, this program might take some time to run.