title: Need a solution on connecting Teradata using Pyspark
body: <p>I have a below code which will be used to connect the hadoop env with Teradata.</p>
  
  <pre><code>sc = spark.sparkContext
  from pyspark.sql import SQLContext
  sqlContext = SQLContext(sc)
  df = sqlContext.read.format("jdbc").options(url="jdbc:teradata://teradata-dns-sysa.fg.rbc.com",driver="com.teradata.jdbc.TeraDriver",dbtable="table",user="userid",password="xxxxxxxx").load()
  </code></pre>
  
  <p>Now the userid &amp; password is different for different users. Hence looking out for a solution where credentials can be stored in a file in a secure location and the code simply refer to the data (userid &amp; password) in the file</p>