Hi,
//Loading all the DB Properties
val options1 = Map("url" ->
"jdbc:oracle:thin:@xx.xxx.xxx.xx:1521:dbname","user"->"username","password"->"password","dbtable"
-> "TESTCONDITIONS")
val testCond = sqlContext.load("jdbc",options1 )
val condval = testCond.select("Cond")
testCond.show()
val options2 = Map("url" ->
"jdbc:oracle:thin:@xx.xxx.xxx.xx:1521:dbanme","user"->"username","password"->"password","dbtable"
-> "Test")
val test= sqlContext.load("jdbc",options2 )
test.select.where(condval ) //gives error as cannot convert sql.Column to
Dataframe
test.select().where(???)
My TestConditions table has only one row
which looks like year = 1965 and month = ;december'
Can I convert sql.Column to list and pass ?
I am new Spark and scala.
Will really appreciate the help.
Thanks,
Divya