Add below properties in cdap-site.xml
<property>
<name>data.storage.implementation</name>
<value>postgresql</value>
<description>
PG as metadata store
</description>
</property>
<property>
<name>data.storage.sql.jdbc.connection.url</name>
<value>jdbc:postgresql://localhost:5432/basanversion3</value>
<description>
PG JDBC details
</description>
</property>
<property>
<name>data.storage.sql.jdbc.driver.name</name>
<value>org.postgresql.Driver</value>
<description>
PG jdbc driver
</description>
</property>
<property>
<name>data.storage.sql.jdbc.driver.external</name>
<value>true</value>
<description>
Indicates whether the JDBC driver has to be loaded from an external directory.
If true, then the JDBC driver directory has to be specified using
"data.storage.sql.jdbc.driver.directory".
If false, then the JDBC driver is present in the CDAP classpath.
This config can only be used when the storage implementation is postgresql.
</description>
</property>
<property>
<name>data.storage.sql.jdbc.driver.directory</name>
<value>/Users/basan/Documents/CDAP/git/postgres</value>
<description>
The base directory for storing JDBC driver jars.
Sub-directory with the name that matches with the value of "data.storage.implementation" setting
will be searched for the corresponding JDBC driver and
dependencies jars to connect to the configured sql instance.
The JDBC driver class to load has to be specified using "data.storage.sql.jdbc.driver.name".
This config can only be used when the storage implementation is postgresql.
</description>
</property>
Create the db in postgres with the name basanversion3
Place the jar postgresql-42.2.24.jar in the location /Users/basan/Documents/CDAP/git/postgres
No comments:
Post a Comment