[jira] [Updated] (NIFI-10869) ExtractText processor - RegEx captured twice

2022-11-23 Thread Luigi De Giovanni (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-10869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luigi De Giovanni updated NIFI-10869:
-
Priority: Minor  (was: Major)

> ExtractText processor - RegEx captured twice
> 
>
> Key: NIFI-10869
> URL: https://issues.apache.org/jira/browse/NIFI-10869
> Project: Apache NiFi
>  Issue Type: Improvement
>Affects Versions: 1.18.0
>Reporter: Luigi De Giovanni
>Priority: Minor
> Attachments: image (1).png, image (2).png, image.png
>
>
> Hi,
> There is an issue with the ExtractText processor, in the attempt of creating 
> FlowFile attributes from FlowFile contents.
> When creating a custom property with a regex value that does not contain 
> named groups, the value captured in the group is added as 2 different 
> attributes.
> E.G.
> ||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
> |param.alpha||param.alpha=alpha|param.alpha=alpha
> param.alpha.1=alpha|
> Reading the documentation, this might even be an expected behaviour, but if 
> so, it is preferable to have the captured value only as a single attribute, 
> without duplication.
> Please see the attachment for an example.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-10869) ExtractText processor - RegEx captured twice

2022-11-23 Thread Luigi De Giovanni (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-10869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luigi De Giovanni updated NIFI-10869:
-
Issue Type: Improvement  (was: Bug)

> ExtractText processor - RegEx captured twice
> 
>
> Key: NIFI-10869
> URL: https://issues.apache.org/jira/browse/NIFI-10869
> Project: Apache NiFi
>  Issue Type: Improvement
>Affects Versions: 1.18.0
>Reporter: Luigi De Giovanni
>Priority: Major
> Attachments: image (1).png, image (2).png, image.png
>
>
> Hi,
> There is an issue with the ExtractText processor, in the attempt of creating 
> FlowFile attributes from FlowFile contents.
> When creating a custom property with a regex value that does not contain 
> named groups, the value captured in the group is added as 2 different 
> attributes.
> E.G.
> ||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
> |param.alpha||param.alpha=alpha|param.alpha=alpha
> param.alpha.1=alpha|
> Reading the documentation, this might even be an expected behaviour, but if 
> so, it is preferable to have the captured value only as a single attribute, 
> without duplication.
> Please see the attachment for an example.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-10869) ExtractText processor - RegEx captured twice

2022-11-23 Thread Luigi De Giovanni (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-10869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luigi De Giovanni updated NIFI-10869:
-
Description: 
Hi,

There is an issue with the ExtractText processor, in the attempt of creating 
FlowFile attributes from FlowFile contents.

When creating a custom property with a regex value that does not contain named 
groups, the value captured in the group is added as 2 different attributes.

E.G.
||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
|param.alpha||param.alpha=alpha|param.alpha=alpha
param.alpha.1=alpha|

Reading the documentation, this might even be an expected behaviour, but if so, 
it is preferable to have the captured value only as a single attribute, without 
duplication.

Please see the attachment for an example.

 

  was:
Hi,

There is an issue with the ExtractText processor, in the attempt of creating 
FlowFile attributes from FlowFile contents.

When creating a custom property with a regex value that does not contain named 
groups, the value captured in the group is added as 2 different attributes.

E.G.
||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
|request.param.alpha||request.param.alpha=alpha|request.param.alpha=alpha
request.param.alpha.1=alpha|

Reading the documentation, this might even be an expected behaviour, but if so, 
it is preferable to have the captured value only as a single attribute, without 
duplication.

Please see the attachment for an example.

 


> ExtractText processor - RegEx captured twice
> 
>
> Key: NIFI-10869
> URL: https://issues.apache.org/jira/browse/NIFI-10869
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.18.0
>Reporter: Luigi De Giovanni
>Priority: Major
> Attachments: image (1).png, image (2).png, image.png
>
>
> Hi,
> There is an issue with the ExtractText processor, in the attempt of creating 
> FlowFile attributes from FlowFile contents.
> When creating a custom property with a regex value that does not contain 
> named groups, the value captured in the group is added as 2 different 
> attributes.
> E.G.
> ||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
> |param.alpha||param.alpha=alpha|param.alpha=alpha
> param.alpha.1=alpha|
> Reading the documentation, this might even be an expected behaviour, but if 
> so, it is preferable to have the captured value only as a single attribute, 
> without duplication.
> Please see the attachment for an example.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-10869) ExtractText processor - RegEx captured twice

2022-11-23 Thread Luigi De Giovanni (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-10869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luigi De Giovanni updated NIFI-10869:
-
Description: 
Hi,

There is an issue with the ExtractText processor, in the attempt of creating 
FlowFile attributes from FlowFile contents.

When creating a custom property with a regex value that does not contain named 
groups, the value captured in the group is added as 2 different attributes.

E.G.
||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
|request.param.alpha||request.param.alpha=alpha|request.param.alpha=alpha
request.param.alpha.1=alpha|

Reading the documentation, this might even be an expected behaviour, but if so, 
it is preferable to have the captured value only as a single attribute, without 
duplication.

Please see the attachment for an example.

 

  was:
Hi,

There is an issue with the ExtractText processor, in the attempt of creating 
FlowFile attributes from FlowFile contents.

When creating a custom property with a regex value that does not contain named 
groups, the value captured in the group is added as 2 different attributes.

E.G.
||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
|request.param.alpha||request.param.alpha=alpha|request.param.alpha=alpha
request.param.alpha.1=alpha|


Reading the documentation, this might even be an expected behaviour, but if so, 
it is preferable to have the captured value only as a single attribute, without 
duplication.

Please see the attachment for a real example

 

 


> ExtractText processor - RegEx captured twice
> 
>
> Key: NIFI-10869
> URL: https://issues.apache.org/jira/browse/NIFI-10869
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.18.0
>Reporter: Luigi De Giovanni
>Priority: Minor
> Attachments: image (1).png, image (2).png, image.png
>
>
> Hi,
> There is an issue with the ExtractText processor, in the attempt of creating 
> FlowFile attributes from FlowFile contents.
> When creating a custom property with a regex value that does not contain 
> named groups, the value captured in the group is added as 2 different 
> attributes.
> E.G.
> ||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
> |request.param.alpha| alpha>|request.param.alpha=alpha|request.param.alpha=alpha
> request.param.alpha.1=alpha|
> Reading the documentation, this might even be an expected behaviour, but if 
> so, it is preferable to have the captured value only as a single attribute, 
> without duplication.
> Please see the attachment for an example.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-10869) ExtractText processor - RegEx captured twice

2022-11-23 Thread Luigi De Giovanni (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-10869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luigi De Giovanni updated NIFI-10869:
-
Priority: Major  (was: Minor)

> ExtractText processor - RegEx captured twice
> 
>
> Key: NIFI-10869
> URL: https://issues.apache.org/jira/browse/NIFI-10869
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.18.0
>Reporter: Luigi De Giovanni
>Priority: Major
> Attachments: image (1).png, image (2).png, image.png
>
>
> Hi,
> There is an issue with the ExtractText processor, in the attempt of creating 
> FlowFile attributes from FlowFile contents.
> When creating a custom property with a regex value that does not contain 
> named groups, the value captured in the group is added as 2 different 
> attributes.
> E.G.
> ||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
> |request.param.alpha| alpha>|request.param.alpha=alpha|request.param.alpha=alpha
> request.param.alpha.1=alpha|
> Reading the documentation, this might even be an expected behaviour, but if 
> so, it is preferable to have the captured value only as a single attribute, 
> without duplication.
> Please see the attachment for an example.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (NIFI-10869) ExtractText processor - RegEx captured twice

2022-11-23 Thread Luigi De Giovanni (Jira)
Luigi De Giovanni created NIFI-10869:


 Summary: ExtractText processor - RegEx captured twice
 Key: NIFI-10869
 URL: https://issues.apache.org/jira/browse/NIFI-10869
 Project: Apache NiFi
  Issue Type: Bug
Affects Versions: 1.18.0
Reporter: Luigi De Giovanni
 Attachments: image (1).png, image (2).png, image.png

Hi,

There is an issue with the ExtractText processor, in the attempt of creating 
FlowFile attributes from FlowFile contents.

When creating a custom property with a regex value that does not contain named 
groups, the value captured in the group is added as 2 different attributes.

E.G.
||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
|request.param.alpha||request.param.alpha=alpha|request.param.alpha=alpha
request.param.alpha.1=alpha|


Reading the documentation, this might even be an expected behaviour, but if so, 
it is preferable to have the captured value only as a single attribute, without 
duplication.

Please see the attachment for a real example

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-10869) ExtractText processor - RegEx captured twice

2022-11-23 Thread Luigi De Giovanni (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-10869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luigi De Giovanni updated NIFI-10869:
-
Priority: Minor  (was: Major)

> ExtractText processor - RegEx captured twice
> 
>
> Key: NIFI-10869
> URL: https://issues.apache.org/jira/browse/NIFI-10869
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 1.18.0
>Reporter: Luigi De Giovanni
>Priority: Minor
> Attachments: image (1).png, image (2).png, image.png
>
>
> Hi,
> There is an issue with the ExtractText processor, in the attempt of creating 
> FlowFile attributes from FlowFile contents.
> When creating a custom property with a regex value that does not contain 
> named groups, the value captured in the group is added as 2 different 
> attributes.
> E.G.
> ||Property Name||Property Value||Expected FlowFile Attribute||Actual outcome||
> |request.param.alpha| alpha>|request.param.alpha=alpha|request.param.alpha=alpha
> request.param.alpha.1=alpha|
> Reading the documentation, this might even be an expected behaviour, but if 
> so, it is preferable to have the captured value only as a single attribute, 
> without duplication.
> Please see the attachment for a real example
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-3620) InvokeHttp should be able to send multipart forms

2022-11-23 Thread Luigi De Giovanni (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-3620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17637755#comment-17637755
 ] 

Luigi De Giovanni commented on NIFI-3620:
-

Hi,

it would be great if this could be fixed.
I have experienced the same issue recently and I managed to work around it.
I am pasting below some info I shared on the slack channel.

"I am dealing with an API which takes only POST requests and needs parameters 
passed in the body, as multipart/form-data .The InvokeHTTP processor doesn't 
work - with the API I am dealing with - if I define the request parameters as 
additional properties, like post:form:.
This is because the form-data is attached by the processor to the URL.
However, since the InvokeHTTP processor takes the contents of the input 
FlowFile as request body, I worked around that by creating the 
multipart/form-data text in a GenerateFlowFile or ReplaceText processor, with 
proper mime type and boundary.
Passing this to the InvokeHTTP without custom attributes makes that API react 
correctly."

The trick is basically in formatting the text of the body as an actual 
multipart/form mime type.
I reproduced it by checking the standard specification for multipart/form-data 
available publicly.

It would be great if the processor was able to do this formatting by itself.
Also, multipart/form-data shouldn't be attached to the URL, but remain in the 
request body only.

For any question, feel free

> InvokeHttp should be able to send multipart forms
> -
>
> Key: NIFI-3620
> URL: https://issues.apache.org/jira/browse/NIFI-3620
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Andre F de Miranda
>Assignee: Andre F de Miranda
>Priority: Major
>
> Currently InvokeHTTP is unable to send multipart forms, meaning it cannot be 
> used to a number of REST APIs endpoints.
> This has been identified by users 
> https://lists.apache.org/thread.html/32654510792f62ab855a785265c5ad5747cc0490da225fd2d44ac10a@%3Cdev.nifi.apache.org%3E



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] (NIFI-5901) Write JSON record in database

2022-11-18 Thread Luigi De Giovanni (Jira)


[ https://issues.apache.org/jira/browse/NIFI-5901 ]


Luigi De Giovanni deleted comment on NIFI-5901:
-

was (Author: JIRAUSER298268):
It would be great to know at least a workaround for this case, if this feature 
is not being implemented.
JOLT transformations don't seem to work, handling the JSON as string, as all 
the field names lose the double quotes.

> Write JSON record in database
> -
>
> Key: NIFI-5901
> URL: https://issues.apache.org/jira/browse/NIFI-5901
> Project: Apache NiFi
>  Issue Type: Improvement
>Affects Versions: 1.8.0
>Reporter: Flo Rance
>Assignee: Mike Thomsen
>Priority: Minor
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> It would be good to be able to store a whole json record in databases that 
> implement it (e.g. postgresql). This would require to define the field in the 
> shema as json/jsonb and then let PutDatabaseRecord inserts the json value in 
> the json/jsonb field.
> At the moment, it's possible to store a json/jsonb through Postgresql JDBC 
> using the Java sql type 'OTHER':
> Object data = "\{...}"; // the JSON document
> PreparedStatement.setObject(1, data, java.sql.Types.OTHER);



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (NIFI-5901) Write JSON record in database

2022-11-09 Thread Luigi De Giovanni (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-5901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17631131#comment-17631131
 ] 

Luigi De Giovanni commented on NIFI-5901:
-

It would be great to know at least a workaround for this case, if this feature 
is not being implemented.
JOLT transformations don't seem to work, handling the JSON as string, as all 
the field names lose the double quotes.

> Write JSON record in database
> -
>
> Key: NIFI-5901
> URL: https://issues.apache.org/jira/browse/NIFI-5901
> Project: Apache NiFi
>  Issue Type: Improvement
>Affects Versions: 1.8.0
>Reporter: Flo Rance
>Assignee: Mike Thomsen
>Priority: Minor
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> It would be good to be able to store a whole json record in databases that 
> implement it (e.g. postgresql). This would require to define the field in the 
> shema as json/jsonb and then let PutDatabaseRecord inserts the json value in 
> the json/jsonb field.
> At the moment, it's possible to store a json/jsonb through Postgresql JDBC 
> using the Java sql type 'OTHER':
> Object data = "\{...}"; // the JSON document
> PreparedStatement.setObject(1, data, java.sql.Types.OTHER);



--
This message was sent by Atlassian Jira
(v8.20.10#820010)