Amazon Redshift DB Connectivity with Spring boot - spring

Recently i have started working with Redshift db with Spring boot. and I have created the connection between
Redshift db and Spring boot using Data Jpa but now i have requirement to communicate with multiple Redshift Databases. and i'm not able to do that can anyone help me.
I have tried simple Jpa Multi DB connection as we do using programmatic way.

Related

Spring WebFlux + reactive DB2 - how to migrate from Hikari datasource and JDBC?

I've migrated an entire project to reactive WebFlux, the only missing thing is the DB queries. At the moment I'm using JdbcTemplate and Hikari Datasources and I need to make DB calls reactive?
I tried to use vertx-db2-client but it seems it does not work fine with Webflux (or I'm not capable to use it correctly).
What options do I have? Can you show any working example with Webflux and DB2?
Thanks
You would need to find that the database DB2 is supported by Spring data reactive libraries. When I look at https://spring.io/projects/spring-data-r2dbc I don't see DB2 being in the list of database they support.

Spring Cassandra repository with manual connection

I want to use spring data Cassandra but I don't want use spring boot configured connection. I will create a connection which has to be used by Cassandra repository. Is this possible

Spring boot oracle database without hibernate?

i managed to connect my spring boot application with postgres without hibernate, but with r2dbc for a reactive application.
I was wondering if i can connect spring boot to oracle database without hibernate for a non reactive application ?
Spring Data provides two basic modules for integrating applications with relational databases. Spring Data JDBC is for imperative applications while Spring Data R2DBC is for reactive ones. They both use the same interfaces and patterns. If you're familiar with Spring Data R2DBC, it will be straightforward to work with Spring Data JDBC.

is it possible to connect to two databases one with spring jpa and another with spring jdbc

I have a requirement to connect to two databases using spring boot. I can able to connect to two different databases using spring jpa, but I want to connect two databases one with spring jpa and another with spring jdbc
I got the solution. I missed to add ComponentScan for JDBC connection configuration and removed #Primary annotation

HiKariCP for Bigquery

I am new to gcloud and trying to leverage bigquery for accessing the data. I am trying to implement a connection pooling mechanism for bigquery and found that Hikari (one of the default datasource provided by spring boot) as a viable option. Could you please guide me in setting up the Bigquery credentials in the Hikari datasource as I am not able to figure out the way to give the driver, url and credentials.
I imported the bigquery api and hikari api in my pom dependencies
FYI: I am trying to make use of springboot
I have managed to establish connection from spring boot to bigquery using simba JDBC drivers and successfully queried it.
Firstly, you need to include GCP starter dependency in your boot.
<artifactId>spring-cloud-gcp-dependencies</artifactId>
Dowload and add dependency jars of simba drivers in spring boot from the below link. Also refer installation guide in the link.
https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers
Secondly, create a service account that has access to bigquery and generate a key JSON file which is used to authenticate our spring boot application for connecting bigquery. Refer the below link.
https://cloud.google.com/bigquery/docs/reference/libraries#setting_up_authentication.
Lastly configure this key JSON file to be accessed by our spring book application using the simba driver JDBC installation guide.
Create a simba driver datasource and use this data source to create JDBC template bean. ( JDBC url formation is given in the installation guide of simba driver) . Thats it!! Run the application and see the results.
If you face any difficulties feel free to ask the specifics.

Resources