[jira] [Commented] (NIFI-830) For GET requests, InvokeHTTP should set the filename of the 'Response' FlowFile based on the URL

2021-11-15 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on NIFI-830:
--

Commit 6fd1f03bd63d41b9c5105a458eb7d81e8ae79700 in nifi's branch 
refs/heads/main from Nandor Soma Abonyi
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=6fd1f03 ]

NIFI-830 Added FlowFile Naming Strategy to InvokeHTTP

This closes #5475

Signed-off-by: David Handermann 


> For GET requests, InvokeHTTP should set the filename of the 'Response' 
> FlowFile based on the URL
> 
>
> Key: NIFI-830
> URL: https://issues.apache.org/jira/browse/NIFI-830
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mark Payne
>Assignee: Nandor Soma Abonyi
>Priority: Minor
>  Labels: beginner, newbie
> Attachments: 
> 0001-NIFI-830-core-attribute-flowfileName-will-be-last-se.patch
>
>  Time Spent: 7h 10m
>  Remaining Estimate: 0h
>
> When using InvokeHTTP to fetch the content of a particular URL, I expected 
> that the filename of the 'Response' FlowFile would be set to the filename 
> pulled. I.e., if I pulled http://www.somesite.com/images/1.png, I would have 
> expected the 'Response' FlowFile to have a filename of "1.png" but instead it 
> had the same filename as the incoming FlowFile.
> I don't think this is something that we can change until version 1.0.0 
> because it could potentially break backward compatibility of flows by 
> changing the filename unexpectedly. In the meantime, I have added an 
> UpdateAttribute to set the filename to 
> ${url:substringAfterLast('/'):substringBefore('?')}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (NIFI-830) For GET requests, InvokeHTTP should set the filename of the 'Response' FlowFile based on the URL

2018-08-24 Thread Taha Kashaf Haider Naqvi (JIRA)


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

Taha Kashaf Haider Naqvi commented on NIFI-830:
---

Thank you for elaborating..

> For GET requests, InvokeHTTP should set the filename of the 'Response' 
> FlowFile based on the URL
> 
>
> Key: NIFI-830
> URL: https://issues.apache.org/jira/browse/NIFI-830
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mark Payne
>Priority: Minor
>  Labels: beginner, newbie
> Attachments: 
> 0001-NIFI-830-core-attribute-flowfileName-will-be-last-se.patch
>
>
> When using InvokeHTTP to fetch the content of a particular URL, I expected 
> that the filename of the 'Response' FlowFile would be set to the filename 
> pulled. I.e., if I pulled http://www.somesite.com/images/1.png, I would have 
> expected the 'Response' FlowFile to have a filename of "1.png" but instead it 
> had the same filename as the incoming FlowFile.
> I don't think this is something that we can change until version 1.0.0 
> because it could potentially break backward compatibility of flows by 
> changing the filename unexpectedly. In the meantime, I have added an 
> UpdateAttribute to set the filename to 
> ${url:substringAfterLast('/'):substringBefore('?')}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-830) For GET requests, InvokeHTTP should set the filename of the 'Response' FlowFile based on the URL

2018-08-24 Thread James Srinivasan (JIRA)


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

James Srinivasan commented on NIFI-830:
---

Afraid I can't easily share the flow, but it looks a bit like this:

 

1) GetFile reads files containing a list of URLs from the filesystem, and 
populates the filename attribute with the filename from which those URLs came 
e.g. file1.txt

2) SplitText separates out each line

3) InvokeHTTP fetches the URL (which is a JSON object)

4) EvaluateJSONPath extracts a value from the JSON e.g. 12345

5) UpdateAttribute updates the filename attribute to contain the source 
filename (from #1) followed by the extracted value (#4) e.g. file1.txt-12345

6) PutFile writes the results to a directory using the updated filename from #5

Hope this makes sense

 

One alternative option might be a new processor parameter to update the 
filename, defaulting to false for backwards compatibility.

> For GET requests, InvokeHTTP should set the filename of the 'Response' 
> FlowFile based on the URL
> 
>
> Key: NIFI-830
> URL: https://issues.apache.org/jira/browse/NIFI-830
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mark Payne
>Priority: Minor
>  Labels: beginner, newbie
> Attachments: 
> 0001-NIFI-830-core-attribute-flowfileName-will-be-last-se.patch
>
>
> When using InvokeHTTP to fetch the content of a particular URL, I expected 
> that the filename of the 'Response' FlowFile would be set to the filename 
> pulled. I.e., if I pulled http://www.somesite.com/images/1.png, I would have 
> expected the 'Response' FlowFile to have a filename of "1.png" but instead it 
> had the same filename as the incoming FlowFile.
> I don't think this is something that we can change until version 1.0.0 
> because it could potentially break backward compatibility of flows by 
> changing the filename unexpectedly. In the meantime, I have added an 
> UpdateAttribute to set the filename to 
> ${url:substringAfterLast('/'):substringBefore('?')}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-830) For GET requests, InvokeHTTP should set the filename of the 'Response' FlowFile based on the URL

2018-08-24 Thread Taha Kashaf Haider Naqvi (JIRA)


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

Taha Kashaf Haider Naqvi commented on NIFI-830:
---

Yes it should considered.I will look into this.

So, this can be expected to be introduced in 2.X

It would be a great help if u could share an operational flow.

Thanks.

> For GET requests, InvokeHTTP should set the filename of the 'Response' 
> FlowFile based on the URL
> 
>
> Key: NIFI-830
> URL: https://issues.apache.org/jira/browse/NIFI-830
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mark Payne
>Priority: Minor
>  Labels: beginner, newbie
> Attachments: 
> 0001-NIFI-830-core-attribute-flowfileName-will-be-last-se.patch
>
>
> When using InvokeHTTP to fetch the content of a particular URL, I expected 
> that the filename of the 'Response' FlowFile would be set to the filename 
> pulled. I.e., if I pulled http://www.somesite.com/images/1.png, I would have 
> expected the 'Response' FlowFile to have a filename of "1.png" but instead it 
> had the same filename as the incoming FlowFile.
> I don't think this is something that we can change until version 1.0.0 
> because it could potentially break backward compatibility of flows by 
> changing the filename unexpectedly. In the meantime, I have added an 
> UpdateAttribute to set the filename to 
> ${url:substringAfterLast('/'):substringBefore('?')}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-830) For GET requests, InvokeHTTP should set the filename of the 'Response' FlowFile based on the URL

2018-08-23 Thread James Srinivasan (JIRA)


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

James Srinivasan commented on NIFI-830:
---

Should Content-Disposition also be considered?

As already noted, this will definitely break backwards compatibility (I can 
think of at least one case in our operational flows)

> For GET requests, InvokeHTTP should set the filename of the 'Response' 
> FlowFile based on the URL
> 
>
> Key: NIFI-830
> URL: https://issues.apache.org/jira/browse/NIFI-830
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Mark Payne
>Priority: Minor
>  Labels: beginner, newbie
> Attachments: 
> 0001-NIFI-830-core-attribute-flowfileName-will-be-last-se.patch
>
>
> When using InvokeHTTP to fetch the content of a particular URL, I expected 
> that the filename of the 'Response' FlowFile would be set to the filename 
> pulled. I.e., if I pulled http://www.somesite.com/images/1.png, I would have 
> expected the 'Response' FlowFile to have a filename of "1.png" but instead it 
> had the same filename as the incoming FlowFile.
> I don't think this is something that we can change until version 1.0.0 
> because it could potentially break backward compatibility of flows by 
> changing the filename unexpectedly. In the meantime, I have added an 
> UpdateAttribute to set the filename to 
> ${url:substringAfterLast('/'):substringBefore('?')}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)