'Setting a NiFi property to null

I have a situation where I want to create and set a property to a value of another property as long as the other property exists.

I have tried to achieve this using the UpdateAttribute process configured as follows:

Property                  Value
   A           ${"B":isNull():ifElse(null, ${"B"})}

But syntax checker gives a red curly brace at the end of the line (I've tried null, Null, NULL). And if I run it anyway, I get a processor exception - unable to evaluate expression due to Unexpected token 'null'.

I'm beginning to think this is not just about finding the correct token to represent null. Is it because properties cannot be set to null? If so, what's the best way to solve this problem?



Solution 1:[1]

I achived that by setting UpdateAttribute Processor "Delete Attribute Expression" property: ${B:isEmpty():ifElse('B','')}

Solution 2:[2]

##[error]Details: ##[error]undefined: ValueType 'System.Boolean' cannot be null.

This is not a common azure deployment issue. Please check the common azure deployment issue

You can find the exact issue by using find error code

There are three types of errors that are related to a deployment:

  • Validation errors occur before a deployment begins and are caused by syntax errors in your file. Your editor can identify these errors.
  • Preflight validation errors occur when a deployment command is run but resources aren't deployed. These errors are found without starting the deployment. For example, if a parameter value is incorrect, the error is found in preflight validation.
  • Deployment errors occur during the deployment process and can only be found by assessing the deployment's progress.

All types of errors return an error code that you use to troubleshoot the deployment. Validation and preflight errors are shown in the activity log but don't appear in your deployment history. A Bicep file with syntax errors doesn't compile into JSON and isn't shown in the activity log.

To identify syntax errors, you can use Visual Studio Code with the latest Bicep extension or Azure Resource Manager Tools extension.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Carl Wang
Solution 2 HariKrishnaRajoli-MT