Unable to split content into multiple flowfiles from ExecuteScript's flowfile
up vote
1
down vote
favorite
I have a test flow to split the dates into multiple flowfile. These dates are generated from ExecuteScript.
But unfortunately while using SplitContent
to split into multiple flowfiles, the flowfile attributes remain same and not splitted.
Following is my flow:
The ExecuteScript produces flowfile attribute all_first_dates
as follows:
I use this in my UpdateAttribute to assign all_first_dates to dates
attribute.
And as my dates values are delimited as newline, I gave configuration for splitcontent as follows:
But on splitting, I find the result remains same as original.
apache-nifi
add a comment |
up vote
1
down vote
favorite
I have a test flow to split the dates into multiple flowfile. These dates are generated from ExecuteScript.
But unfortunately while using SplitContent
to split into multiple flowfiles, the flowfile attributes remain same and not splitted.
Following is my flow:
The ExecuteScript produces flowfile attribute all_first_dates
as follows:
I use this in my UpdateAttribute to assign all_first_dates to dates
attribute.
And as my dates values are delimited as newline, I gave configuration for splitcontent as follows:
But on splitting, I find the result remains same as original.
apache-nifi
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a test flow to split the dates into multiple flowfile. These dates are generated from ExecuteScript.
But unfortunately while using SplitContent
to split into multiple flowfiles, the flowfile attributes remain same and not splitted.
Following is my flow:
The ExecuteScript produces flowfile attribute all_first_dates
as follows:
I use this in my UpdateAttribute to assign all_first_dates to dates
attribute.
And as my dates values are delimited as newline, I gave configuration for splitcontent as follows:
But on splitting, I find the result remains same as original.
apache-nifi
I have a test flow to split the dates into multiple flowfile. These dates are generated from ExecuteScript.
But unfortunately while using SplitContent
to split into multiple flowfiles, the flowfile attributes remain same and not splitted.
Following is my flow:
The ExecuteScript produces flowfile attribute all_first_dates
as follows:
I use this in my UpdateAttribute to assign all_first_dates to dates
attribute.
And as my dates values are delimited as newline, I gave configuration for splitcontent as follows:
But on splitting, I find the result remains same as original.
apache-nifi
apache-nifi
edited Nov 7 at 10:39
Flimzy
1
1
asked Nov 7 at 10:37
Jasim Waheed
128111
128111
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
SplitContent processor splits flowfile contents based on the byte sequence
but not the flowfile attributes
.
In your case flow will be something like below:
1.GenerateFlowfile
2.ExecuteScript
3.ReplaceText //Always replace as Replacement strategy and
Replacement value as ${all_first_dates}
4.SplitContent (or) SplitText //to split each line as individual flowfile
5.ExtractText //add new property dates with value as (.*)
Now each flowfile will have dates attribute with the value
6.PutFile.
In addition if you want to get some specific value from ${all_first_dates} then use getDelimitedField function on the attribute value using UpdateAttribute
processor.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
SplitContent processor splits flowfile contents based on the byte sequence
but not the flowfile attributes
.
In your case flow will be something like below:
1.GenerateFlowfile
2.ExecuteScript
3.ReplaceText //Always replace as Replacement strategy and
Replacement value as ${all_first_dates}
4.SplitContent (or) SplitText //to split each line as individual flowfile
5.ExtractText //add new property dates with value as (.*)
Now each flowfile will have dates attribute with the value
6.PutFile.
In addition if you want to get some specific value from ${all_first_dates} then use getDelimitedField function on the attribute value using UpdateAttribute
processor.
add a comment |
up vote
3
down vote
accepted
SplitContent processor splits flowfile contents based on the byte sequence
but not the flowfile attributes
.
In your case flow will be something like below:
1.GenerateFlowfile
2.ExecuteScript
3.ReplaceText //Always replace as Replacement strategy and
Replacement value as ${all_first_dates}
4.SplitContent (or) SplitText //to split each line as individual flowfile
5.ExtractText //add new property dates with value as (.*)
Now each flowfile will have dates attribute with the value
6.PutFile.
In addition if you want to get some specific value from ${all_first_dates} then use getDelimitedField function on the attribute value using UpdateAttribute
processor.
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
SplitContent processor splits flowfile contents based on the byte sequence
but not the flowfile attributes
.
In your case flow will be something like below:
1.GenerateFlowfile
2.ExecuteScript
3.ReplaceText //Always replace as Replacement strategy and
Replacement value as ${all_first_dates}
4.SplitContent (or) SplitText //to split each line as individual flowfile
5.ExtractText //add new property dates with value as (.*)
Now each flowfile will have dates attribute with the value
6.PutFile.
In addition if you want to get some specific value from ${all_first_dates} then use getDelimitedField function on the attribute value using UpdateAttribute
processor.
SplitContent processor splits flowfile contents based on the byte sequence
but not the flowfile attributes
.
In your case flow will be something like below:
1.GenerateFlowfile
2.ExecuteScript
3.ReplaceText //Always replace as Replacement strategy and
Replacement value as ${all_first_dates}
4.SplitContent (or) SplitText //to split each line as individual flowfile
5.ExtractText //add new property dates with value as (.*)
Now each flowfile will have dates attribute with the value
6.PutFile.
In addition if you want to get some specific value from ${all_first_dates} then use getDelimitedField function on the attribute value using UpdateAttribute
processor.
answered Nov 7 at 12:04
Shu
3,8112417
3,8112417
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53187761%2funable-to-split-content-into-multiple-flowfiles-from-executescripts-flowfile%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown