What are the challenges you face when working across database platforms? Take the survey

XML sync rule

Is it possible to have something like a Sync rule which can consistently update XML data, for example if the Currency Code element has been masked to USD can the Currency Name element be synced to US Dollars. Or is there a way to update two elements at the same time from the same dataset?


  • Options
    Hi @ccparkhill thanks for your post - would you be able to expand on this a little bit more at all please?
    There's currently nothing available in Data Masker that would allow you to carry out a sync rule between XML fields but there are some workarounds available.
    For example, using a command rule to extract the element from the XML to another (e.g. nvarchar) column, masking that with a Substitution rule that you convert to a sync manager, which would allow you to add a table-to-text rule to sync back into affected XML fields.
    Obviously this isn't _ideal_ behaviour, but we're keen to make sure you get a resolution!
    Thank you very much!
  • Options
    We would want the data consistently masked, for example the data may be extracted and used for reporting. One report might filter on the currency code where as another report might filter on the currency name, if the data is not consistently masked the first report would give you a different value for USD compared with the second report when selecting US Dollars. 

    Your suggested solution might work if there were just one value per row but what if we had something like "Countries visited in last 90 days", this might have two countries with codes and names as separate elements, e.g. GBR/United Kingdom and USA/United States of America.

    Are we better off using XML "replace value of" via a SQL command rule?
  • Options
    Hi @ccparkhill

    Firstly - a million apologies, I honestly thought I had replied on this and have only just now gone back through some of my replies and realized I never actually came back to you on your question, and I'm mortified!

    Secondly - if you're still trying to achieve this, would you be able to provide me with a scrubbed version of the XML so that I can do some testing for you please? I'm happy to look at some options with Data Masker, the XML replace value of MAY be your best bet, but I want to make sure there are no options with Data Masker in the first instance.

    Thank you very much,
Sign In or Register to comment.