I am trying to add the sort keys from scala code by following instructions here: https://github.com/databricks/spark-redshift
df.write
.format(formatRS)
.option("url", connString)
.option("jdbcdriver", jdbcDriverRS)
.option("dbtable", table)
.option("tempdir", tempDirRS + table)
.option("usestagingtable", "true")
.option("diststyle", "KEY")
.option("distkey", "id")
.option("sortkeyspec", "INTERLEAVED SORTKEY (id,timestamp)")
.mode(mode)
.save()
The sort keys are being implemented wrong because when I am checking the table info:
sort key = INTERLEAVEDĖ
I need the right way to add the sort keys.