Forum Discussion
Can you give a concrete example, that might help to clarify things.
Here’s a few ways to delete fields in a document:
- In the Mapper, if you leave the “Target Path” property for a row empty it will treat the expression as a JSON-Path and delete whatever fields are on the path.
- Through the expression language, the Object.filter() method will return a new object with only the fields that match the callback passed into the method. So, in a Mapper, you can write an expression like
$.filter((val, key) => key != 'foo')
to create a new document and then set the target path to ‘$’ to write out the new object.
Thanks for the pattern.
- Have you tested this with various data types, such as, MSSQL BIT and VARBINARY?
- I’m looking to make this more generic so I could pass in a list of tables to the SQLServer Select Snap and migrate each table.
Thanks in advance,
Sonny