# Setting up JDBC connector for PostgreSQL?

**URL:** <https://forums.percona.com/t/setting-up-jdbc-connector-for-postgresql/8262>\
**Category:** General Questions\
**Tags:** postgres\
**Created:** [November 10, 2020, 10:26am UTC](https://forums.percona.com/t/setting-up-jdbc-connector-for-postgresql/8262 "2020-11-10T10:26:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![databaseInger](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@databaseInger](https://forums.percona.com/u/databaseInger)\
**Post date:** [November 10, 2020, 10:26am UTC](https://forums.percona.com/t/setting-up-jdbc-connector-for-postgresql/8262/1 "2020-11-10T10:26:03Z")

</div>

Hi,

I have been using the DBaaS provider Aiven for 3 weeks now to manage and administer my databases. Currently I have data stored in my object-relational database PostgreSQL. To be able to process data streams and forward them to third party systems, I am currently setting up Apache Kafka. To load the data from PostgreSQL into Kafka I need a JDBC connector, right? How can I set this up with Aiven?

---

<div class="post-metadata">

**Author:** ![food\_lover](https://avatars.discourse-cdn.com/v4/letter/f/c57346/32.png) [@food\_lover](https://forums.percona.com/u/food_lover)\
**Post date:** [November 10, 2020, 11:36am UTC](https://forums.percona.com/t/setting-up-jdbc-connector-for-postgresql/8262/2 "2020-11-10T11:36:00Z")

</div>

Yeah, right. Using the JDBC connector you can push data from a relational database, in your case PostgreSQL, to Kafka. Before you can set up the connector, you need the following information from the Aiven console:

- for the Kafka service: KAFKA\_HOST, KAFKA\_PORT, KAFKA\_CONNECT\_SERVICE\_URI

- for the PostgreSQL service PG\_SERVICE\_URI, PG\_HOST, PG\_PORT, PG\_USER, PG\_PW, PG\_DEFAULT\_DB

A typical JDBC URL that is required would look something like this: “JDBC\_URL=jdbc:postgresql://PG\_HOST:PG\_PORT/PG\_DEFAULT\_DB? ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory” First you need to log in to PostgreSQL and create a schema and then create a Json file. Then you can create the JDBC connector. In a separate terminal you have to run the Consumer console. You can find the exact commands and information about the schemas on the official page (in the support area) for copying: [https://aiven.io/postgresql](https://aiven.io/postgresql)
