Migrating Oracle Table to Redshift – Generating the desired schema

In my current work we are migrating some of our workload to Redshift. And that includes migrating many of tables from Oracle to Amazon Redshift. We know these two are very different platforms and we cant simply copy the Oracle’s DDL and create a table on Redshift.  Redshift doesn’t(yet) enforce primary keys, the data types […]

Amazon Redshift – How to get the sizes of all tables

This is another useful script, in the series of Redshift related tools and scripts that I find very useful. The following query gives you all tables and their row count and disk size on a given database in Redshift cluster. You can tweak it and customize more as per your requirements. Important attributes to remember here […]

Java Code: URL Shortener

Wrote this code some time back for a programming interview, sharing it for everyone’s use. Its a 64 character encoded URL shortener code written in java. The code does not use any database backend but can be easily modified to support that.   import java.util.HashMap; import java.util.Random; /* * URL Shortener */ public class URLShortener […]