Question

throw error if schema doesn't match


Badge
Hello ,

 

 

Is there a way to check if source feature class schema matches exactly with destination feature class . If not throw error ?

 

 


7 replies

Badge +1
Hello, 

 

 

You could set up various tests, if you need to check the schema of the data. However, if you just want to ensure that the source data schema is replicated on the output, you can use a dynamic writer.

 

 

Owen
Badge
Hello Owen, 

 

 

I need to check schema between source and destination feature class if the schema matches then I have to proceed loading the data from source to destination or else terminate . 

 

 

Is there any way I can do the above using dynamic reader and dynamic writer ? 

 

 

Badge +1
Does the table already exist in the destination database?
Badge
Yes it does . 
Badge +3
 just read the schema's and compare them?
Badge +1
Depending on the format, you can use a Schema Reader to read the source and destination schemas, a listexploder then merge them using a featuremerger, joining on feature_type_name, field name, data_type. If anything comes out of the 'unmerged' port, then you could terminate the workspace.

 

Badge
Thanks Owen and Gio . 

 

 

Let me try this and get back to you 

Reply