简体   繁体   English

如何使用FASTLOAD通过Spark数据帧将数据加载到Teradata表中

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

I am trying to insert data into teradata table. 我试图将数据插入teradata表。 I have data in Spark dataframe. 我在Spark数据帧中有数据。 I want to insert this dataframe with more than 25 million records into Teradata table using JDBC drivers. 我想使用JDBC驱动程序将包含超过2500万条记录的数据帧插入到Teradata表中。

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. 插入int teradata时,这不使用FASTLOAD。 Is this correct way? 这是正确的方法吗?

您应该使用FASTEXPORT而不是FASTLOAD

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM