asif5494
New Contributor III

Thanks @Camilla Lok​ for your valuable response. As I have mentioned in I just need to delete the current day data not the entire table data, I mentioned the Truncate query just for reference but we need to run delete query instead of Truncate.

(DF.write
 .format("bigquery")
 .option("temporaryGcsBucket", "Bucket-Name")
 .option("preActions",'delete from Table_Name where Date_Col="2023-01-20"`')
 .mode("append")
 .option("credentialsFile",credentialfilepath)
 .option("parentProject",projectName)
 .option("table", "Table-Name")
 .save()
 )

But this delete query is not working in the above query.