Skip to main content
Archived

Add a "Truncate Cascade Existing" statement before loading

Related products:Integrations
  • December 23, 2022
  • 2 replies
  • 55 views

oliviergayte
Contributor
Forum|alt.badge.img

Database writers offer a "Table Handling" property with a "Truncate Existing" Option.

This option may be inefficient if a foreign key constraint has been set on the table. A simple solution would be to implement a "Truncate Cascade Existing" Option.

2 replies

LizAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • April 5, 2025
OpenArchived

LizAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • April 5, 2025
As a best practice, it is recommended to use the SQL to Run Before parameter on any database writer to handle truncate cascade. For more information see the documentation: https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/sqlserver_jdbc/sqlserver_jdbc_writer.htm This idea relates to https://community.safe.com/ideas/for-feature-type-table-handling-truncate-if-exists-create-if-needed-28782