Skip to main content
Solved

'Drop and Create' on SDE Feature Class with Attachments deletes the attachments


Hi there -

 

I'm trying to make schema changes to an SDE feature class as well as an SDE table.... both have attachments and the obligatory relationship class. When I try and output to the writer using "Drop and create", the attachments (and relationship class) are deleted. But when I output using another option (e.g. truncate), they are not deleted. I'd like to use "drop and create" because we need to reorder fields and add new ones.

 

Wondering if I'm doing something wrong, or not understanding the process, or not using a much better alternative. Or possibly all 3!

Best answer by erik_jan

This is standard functionality of all relational databases.

A relationship between tables can not exist if one of the tables does not exist.

The Drop and Create removes the table (and the database will remove the relationship).

Truncate does not remove the table, just the data.

View original
Did this help you find an answer to your question?

2 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • Best Answer
  • August 20, 2019

This is standard functionality of all relational databases.

A relationship between tables can not exist if one of the tables does not exist.

The Drop and Create removes the table (and the database will remove the relationship).

Truncate does not remove the table, just the data.


  • Author
  • August 20, 2019

Thanks @erik_jan. That does make sense...although it does seem a bit strange that FME is simply deleting the attachment table. All I was going to do was recreate (via drop and create) the same table with minor schema changes, so it seems the relationship with the attachment table could be re-established once the table is rebuilt, but since the attachment table is automatically deleted i don't have that option.

Although if the delete of the attachments is happening on the esri/SDE side, then it's unfair of me to blame FME!

Thanks again for the reply.


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