Posts

Showing posts with the label amazon-redshift

Find Top 1000 entries along with count and rank from table

Image
Clash Royale CLAN TAG #URR8PPP Find Top 1000 entries along with count and rank from table I have a table with around 30 billions rows in Redshift with following structure, userid itemid country start_date uid1 itemid1 country1 2018-07-25 00:00:00 uid2 itemid2 country1 2018-07-25 00:00:00 uid3 itemid1 country2 2018-07-25 00:00:00 uid4 itemid3 country1 2018-07-25 00:00:00 uid5 itemid1 country1 2018-07-25 00:00:00 uid1 itemid2 country2 2018-07-25 00:00:00 uid2 itemid2 country2 2018-07-25 00:00:00 Here, I want to find item's are bought by how many unique users and then pick top 1000 most sold item for each country and start_date. Here, both rank and number of times item sold is required. Following output is expected itemid country sold_count start_date itemid1 country1 2 2018-07-25 00:00:00 itemid2 country2 2 2018-07-25 00:00:00 itemid1 country2 1 2018-07-25 00:00:00 itemid2 country...

Redshift jdbc connection configuration with Spring boot 2 not working

Image
Clash Royale CLAN TAG #URR8PPP Redshift jdbc connection configuration with Spring boot 2 not working Here are my dependencies in build.gradle. compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.0.2.RELEASE' compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.0.3.RELEASE' compile group: 'postgresql', name: 'postgresql', version: '9.1-901-1.jdbc4' compile group: 'com.amazon.redshift', name: 'redshift-jdbc42', version: '1.2.10.1009' compile group: 'org.eclipse.jetty', name: 'jetty-util', version: '9.4.11.v20180605' compile group: 'org.hibernate', name: 'hibernate-java8', version: '5.0.0.CR1' compile group: 'com.vladmihalcea', name: 'hibernate-types-52', version: '2.2.2' When I start my application,It's not able to start tomcat server. I am get...