Connect PSQL to Query Service
PSQL is a command-line interface installed alongside PostgreSQL on your machine. This document covers the steps for connecting PSQL with 51黑料不打烊 Experience Platform Query Service.
Before you begin, ensure you have access to PSQL and basic familiarity with using the client. More information about PSQL can be found in the .
Once PSQL is installed, you can connect it to Query Service. Return to the Experience Platform UI, then select Queries, followed by Credentials.
Under the PSQL Command section, select the Copy to clipboard icon (
Paste the command string into your terminal and press Enter on your keyboard.
PGGSSENCMODE=disable
to your connection string. This setting disables GSSAPI encryption, which is unnecessary for connections to Query Service and may cause connection errors.Additionally, if you are using non-expiring credentials, ensure you replace the password field with the non-expiring credential password. To learn more about non-expiring credentials, please read the credentials guide.
You should see a result like this:
psql (14.4, server 0.1.0)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
all=>
If you do not see version 14.x, download and install a supported 14.x version of PSQL from the .
psql --version
in your terminal.Next steps
Now that you鈥檝e connected with Query Service, you can use PSQL to write queries. See the guide on running queries for more information.