ContributionsMost RecentMost LikesSolutionsData Validator Snap - multiple validations I have two fields I wish to validate. These fields simply just need to be present. I attempted to use the Data Validator snap. Its configuration is similar to the screen shot below. This snap routes documents to the error view where $field1 is null with a message “Missing property value of $.field1”. Similarly for field2. I wish to notify users of the issue with their input data. If a document is missing both fields, only the first message appears in the error output. Which means the user will correct the input data for the first problem but have to wait and be notified about the second missing value after a subsequent run. Is this the expected behaviour. I know that I could use a copy snap and two data validators but that introduces additional steps to bring valid records back into the pipeline flow. Is there a way to get the Data Validator snap to behave as I would like? Re: Detect XML attribute xsi:nil and apply null value Expanding on the solution provided and using information from the web related to javascript, I came up with the following statement. There was experimentation involved for sure. $.mapValues((value,key)=> typeof(value) == ‘object’ && value.hasOwnProperty(“@xsi:nil”)? null :value).mapKeys((value,key)=> key.replace(‘ns2:’,‘’)) mapValues and mapKeys are admittedly a bit of a black box for me still. Thanks @JensDeveloper for leading me done a good path. Re: Detect XML attribute xsi:nil and apply null value Thanks for this example. I was envisioning something that iterated through all the fields in the document and converting these objects to null. Do you believe that to be possible? Any number of fields could be null and that could be different in each document being processed. Thanks again. Detect XML attribute xsi:nil and apply null value I am using a SOAP Execute to retrieve information from an API. The payload is being converted to JSON. The problem is any field that is null returns with an attribute of @xsi:nil:“true”. This is just an example subset. There are actually more than 10 fields returning like this. [ { “ns2:communityCodeDesc”: { “@xmlns:xsi”: “http://www.w3.org/2001/XMLSchema-instance”, “@xsi:nil”: “true” }, “ns2:countyCodeDesc”: { “@xmlns:xsi”: “http://www.w3.org/2001/XMLSchema-instance”, “@xsi:nil”: “true” }, “ns2:dateCreated”: “2023-05-16T11:49:32.010-04:00”, “ns2:dateObsoleted”: { “@xmlns:xsi”: “http://www.w3.org/2001/XMLSchema-instance”, “@xsi:nil”: “true” }, “ns2:familyRSN”: “1250” } ] I need this to be in a more standard JSON form like this… [ { “communityCodeDesc”: null, “countyCodeDesc”: null, “dateCreated”: “2023-05-16T11:49:32.010-04:00”, “dateObsoleted”: null, “familyRSN”: “1250” } ] So I need the xsi: construct converted to null and the namespace identifier dropped. Any help would be appreciated. SolvedRe: Expression solution for transformation Thanks so much. This worked as needed. Expression solution for transformation I have to transform documents that look like the following: [{ “Id”: 999, “field1”: “value1”, “field2”: “value2”, “field3”: “value3” } ] Into output like this. [{ “Id”: 999, “entity”: { “path”: “field1”, “op”: “replace”, “value”: “value1” } }, { “Id”: 999, “entity”: { “path”: “field2”, “op”: “replace”, “value”: “value2” } }, { “Id”: 999, “entity”: { “path”: “field3”, “op”: “replace”, “value”: “value3” } } ] There can be multiple documents being processed and the number of “fields” is more (30+) than the example shows. I have created a Mapper snap to do this work for a few fields but would like not to have to do it for 30+. I feel there is an expression/javascript solution to this but I am not well versed at this time. Any ideas would be appreciated. Regards, SolvedRe: Directory Browser vs File Poller snap koryknick: it will send those on to the next snap and continue polling This post is a few years old but I wanted to get clarity on this statement. You seemed to indicate that at the end of each polling interval, the output is passed downstream and polling will continue until the time out. That has not been my experience. The output for me was only passed on once the timeout was hit. Items were added to the output at each polling event if they were added to the file location being polled but not until the timeout is reached does the output move on. Is there a configuration for the snap that will achieve the behavior you experienced? I have experimented with different combinations of “Only Output on Change” and “Exit on first matches” but have not achieve the behavour as you describe. Has your experience changed with this File Poller snap? Thanks, Re: Launched: New Public APIs for CI/CD I am trying through PostMan. The project space does exist. I believe my authentication is good as I am able to use a different API endpoint with success. Regards, Re: Launched: New Public APIs for CI/CD I am attempting to use the new https://elastic.snaplogic.com/api/1/rest/public/project/ api to create a new project. I am appending the to the path my specific org/space/newprojectname as indicated in the documentation. I have upgraded my snapplex to 4.28. The API is returning a 404 not found error. Is there something else needed for this to work?