Skip to main content
Archived

Add a "Truncate Cascade Existing" statement before loading

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

oliviergayte
Contributor

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+15
  • Safer
  • April 5, 2025
OpenArchived

LizAtSafe
Safer
Forum|alt.badge.img+15
  • 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

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings