Skip to main content
Post Closed as "Duplicate" by vvg, eliasah apache-spark
added 2 characters in body
Source Link
koiralo
  • 23.2k
  • 6
  • 57
  • 77

I am trying to export saprkSQLsaprkSQL query output to Teradata. I am able to connect teradata from spark using JDBC driver and run some queries on already existing tables in Teradata, but I am unable to figure out how can I insert data that I received from my spark sql(Hive query output) to a teradata Table

This what I used to connect

 val jdbcDF = sqlContext.load("jdbc", Map( "url" -> "jdbc:teradata://******/database=****,  TMODE=TERA,  user=****,  password=*****", "dbtable" -> "(select count(*) as t from table) as ST", "driver" -> "com.teradata.jdbc.TeraDriver")  ) 

I am trying to export saprkSQL query output to Teradata. I am able to connect teradata from spark using JDBC driver and run some queries on already existing tables in Teradata, but I am unable to figure out how can I insert data that I received from my spark sql(Hive query output) to a teradata Table

This what I used to connect

 val jdbcDF = sqlContext.load("jdbc", Map("url" -> "jdbc:teradata://******/database=****, TMODE=TERA, user=****, password=*****","dbtable" -> "(select count(*) as t from table) as ST","driver" -> "com.teradata.jdbc.TeraDriver")) 

I am trying to export saprkSQL query output to Teradata. I am able to connect teradata from spark using JDBC driver and run some queries on already existing tables in Teradata, but I am unable to figure out how can I insert data that I received from my spark sql(Hive query output) to a teradata Table

This what I used to connect

val jdbcDF = sqlContext.load("jdbc", Map( "url" -> "jdbc:teradata://******/database=****,  TMODE=TERA,  user=****,  password=*****", "dbtable" -> "(select count(*) as t from table) as ST", "driver" -> "com.teradata.jdbc.TeraDriver")  ) 
Source Link
sande
  • 686
  • 2
  • 11
  • 30

How to insert hive data to Teradata Table using spark-shell

I am trying to export saprkSQL query output to Teradata. I am able to connect teradata from spark using JDBC driver and run some queries on already existing tables in Teradata, but I am unable to figure out how can I insert data that I received from my spark sql(Hive query output) to a teradata Table

This what I used to connect

 val jdbcDF = sqlContext.load("jdbc", Map("url" -> "jdbc:teradata://******/database=****, TMODE=TERA, user=****, password=*****","dbtable" -> "(select count(*) as t from table) as ST","driver" -> "com.teradata.jdbc.TeraDriver"))