val sqlcontext=new org.apache.spark.sql.SQLContext(sc)
val spark_pk = sqlcontext.load("jdbc",Map("url" -> "jdbc:teradata://TD_HOSTNAME/,TMODE=ANSI,CHARSET=UTF8,user=,password=","dbtable" -> "(select count(*) as cnt from DB.TABLE) AS ST", "driver" -> "com.teradata.jdbc.TeraDriver"))
val sqlcontext=new org.apache.spark.sql.SQLContext(sc) val spark_pk = sqlcontext.load("jdbc",Map("url" -> "jdbc:teradata://TD_HOSTNAME/,TMODE=ANSI,CHARSET=UTF8,user=,password=","dbtable" -> "(select count(*) as cnt from DB.TABLE) AS ST", "driver" -> "com.teradata.jdbc.TeraDriver"))