I have an issue in a pyspark dataframe u_final below, when I show the dataframe it looks correct, but when I insert in the table, the insertion shows me a different dataframe with less data, and as ou can see I have nothing between the show command and the insertion command.
u_final.show()
dp.data_jdbc_writer("jdbc:oracle:thin:@//127.0.0.1:1521/JDET","user","pwd","overwrite","IFDWH.IF_DEPARTMENT", u_final)
-- data_jdbc_writer function definition :
def data_jdbc_writer(url:str,truncate:str, user:str,pwd:str,mode:str,table:str, data):
data.write \
.format("jdbc") \
.option("driver", "oracle.jdbc.OracleDriver")\
.option("url", url) \
.option("truncate", true) \
.option("user", user) \
.option("password", pwd) \
.mode(mode) \
.option("CreateTableOptions", '') \
.option("dbtable", table) \
.save()
The casting is correct, the same structure and same data types.