Skip to main content

It seems as though the SchemaMapper is setup for only If-Then statements. I'm wondering if there is perhaps a way to use the SchemaMapper by way of a Contains statement.

 

For example, if Attr1 contains 'xyz', make Attr2='123'. I don't believe this is possible, but was curious if anyone found a work-around to make it work.

The contains is not available in Schemamapper as far as I know, but that doesn't mean you can't do it. You just need to work out if the contain is true before passing in into the schemamapper.

 

Just test Attr 1 for a contains 'xyz' and if it does, make Attr3 = 'xyz' and then schemamap Attr3 = 'xyz' to create Attr2='123'


The contains is not available in Schemamapper as far as I know, but that doesn't mean you can't do it. You just need to work out if the contain is true before passing in into the schemamapper.

 

Just test Attr 1 for a contains 'xyz' and if it does, make Attr3 = 'xyz' and then schemamap Attr3 = 'xyz' to create Attr2='123'

Thanks. That's a good thought, but in my scenario I literally have hundreds of 'contains' instances, which would kind of defeat the purpose of using SchemaMapper afterward (why not just map it with conditionals in the AttributeCreator). It doesn't seem that far fetched to have this functionality built into the transformer....maybe this was better suited as a suggestion.


Hello @dustin​ , it doesn't look like this is offered by the SchemaMapper yet. I found an idea that you may want to upvote in the meantime! It would also be helpful if you could add a comment as to why you need the 'contains' operator present in the SchemaMapper. Sorry I don't have better news, Kailin.


Reply