Skip to main content
Question

throw error if schema doesn't match


Forum|alt.badge.img
Hello ,

 

 

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

 

 

7 replies

owen
Forum|alt.badge.img+1
  • July 16, 2014
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

Forum|alt.badge.img
  • Author
  • July 16, 2014
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 ? 

 

 


owen
Forum|alt.badge.img+1
  • July 16, 2014
Does the table already exist in the destination database?

Forum|alt.badge.img
  • Author
  • July 16, 2014
Yes it does . 

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 16, 2014
 just read the schema's and compare them?

owen
Forum|alt.badge.img+1
  • July 16, 2014
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.

 


Forum|alt.badge.img
  • Author
  • July 16, 2014
Thanks Owen and Gio . 

 

 

Let me try this and get back to you 

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