'Read data from Teradata DB in Azure Spark

I want to read and create a data frame of data from my Teradata Database, in azure spark. I have uploaded terajdbc4.jar in my spark cluster, and my code is as follows

val jdbcDF = sqlContext.load("jdbc", Map(
  "url" -> "jdbc:teradata://<server_name>, TMODE=TERA, user=my_user, password=*****",
  "dbtable" -> "schema.table_name",
  "driver" -> "com.teradata.jdbc.TeraDriver"))

But I am getting errors as

"Name or service not known at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)".

My server name is ecdwprod.na.ko.com, which is correct, But I don't know why I am facing this issue. Can anyone please help?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source