How to load data into Teradata table using FASTLOAD through Spark dataframe

Viewed 2302

I am trying to insert data into teradata table. I have data in Spark dataframe. I want to insert this dataframe with more than 25 million records into Teradata table using JDBC drivers.

How do I do this?

I am using following configuration.

val connectionProperties = new java.util.Properties

connectionProperties.setProperty("driver", "com.teradata.jdbc.TeraDriver")
connectionProperties.setProperty("password","PASSWORD")
connectionProperties.setProperty("TMODE","TERA")
connectionProperties.setProperty("TYPE","FASTLOAD")
df.write.mode("append").jdbc("jdbc:teradata://10.196.51.107/user=USERNAME","DBname.emp_table", connectionProperties)

This is not using FASTLOAD while inserting int teradata. Is this correct way?

1 Answers

You should use FASTEXPORT and not FASTLOAD

Related