Member since
08-29-2022
7
Posts
0
Kudos Received
0
Solutions
03-15-2023
01:42 PM
Hello, I'm using the InvokeHTTP processor to make a GET request from an API, however, before getting access to the API, there's a keycloak sign-in page that I need to bypass and the InvokeHTTP process returns that page as a csv response. Is the a way to sign-in or to use a token when making the GET request so I can make the right API call.
... View more
Labels:
- Labels:
-
Apache NiFi
11-10-2022
07:43 AM
As the question states I was wondering if it's possible to do something like: anyMatchingAttribute(
${attributeToSearch}
).contains(${value}) Thank you
... View more
Labels:
- Labels:
-
Apache NiFi
09-22-2022
07:55 AM
I have a custom processor which takes in a flowfile and based on the given attributes it creates new attributes and returns. However, I keep getting this error and I've checked the forums and I can't see where the problem is. Any help is appreciated. o.a.n.controller.tasks.ConnectableTask Processing halted: uncaught exception in Component [LocationParserProcessor[id=630e7e24-0183-1000-905c-8f31dc8a1e22]]
org.apache.nifi.processor.exception.FlowFileHandlingException: StandardFlowFileRecord[uuid=82eb8ad5-a9e3-473a-991b-0c4a3ab2bf36,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1663856909589-1, container=default, section=1], offset=698, length=188],offset=0,name=file.csv,size=96] transfer relationship not specified. This FlowFile was not created in this session and was not transferred to any Relationship via ProcessSession.transfer()
at org.apache.nifi.controller.repository.StandardProcessSession.validateCommitState(StandardProcessSession.java:259)
at org.apache.nifi.controller.repository.StandardProcessSession.checkpoint(StandardProcessSession.java:274)
at org.apache.nifi.controller.repository.StandardProcessSession.commit(StandardProcessSession.java:556)
at org.apache.nifi.controller.repository.StandardProcessSession.commitAsync(StandardProcessSession.java:510)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:28)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1356)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:246)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829) @Tags({"example"})
@CapabilityDescription("Provide a description")
@SeeAlso({})
@ReadsAttributes({@ReadsAttribute(attribute="", description="")})
@WritesAttributes({@WritesAttribute(attribute="", description="")})
public class LocationParserProcessor extends AbstractProcessor {
public static final Relationship REL_SUCCESS = new Relationship.Builder()
.name("success")
.description("FlowFile attributes updated")
.build();
public static final Relationship REL_FAILURE = new Relationship.Builder()
.name("failure")
.description("FlowFile attributes not updated")
.build();
private List<PropertyDescriptor> descriptors;
private Set<Relationship> relationships;
@Override
protected void init(final ProcessorInitializationContext context) {
relationships = new HashSet<>();
relationships.add(REL_SUCCESS);
relationships.add(REL_FAILURE);
relationships = Collections.unmodifiableSet(relationships);
}
@Override
public Set<Relationship> getRelationships() {
return this.relationships;
}
@Override
public final List<PropertyDescriptor> getSupportedPropertyDescriptors() {
return descriptors;
}
@OnScheduled
public void onScheduled(final ProcessContext context) {
}
@Override
public void onTrigger(final ProcessContext context, final ProcessSession session) {
FlowFile flowFile = session.get();
if ( flowFile == null ) {
return;
}
try {
String att1 = flowFile.getAttribute("att1");
String att_list = flowFile.getAttribute("att_list");
String[] atts = att_list.split(",");
String all_atts="";
for(int i=0;i<atts.length;i++){
all_atts=all_atts+" "+flowFile.getAttribute(atts[i]);
}
List<String> result = Conversion.convert(all_atts,atts);
HashMap<String, String> attributes = new HashMap<>();
attributes.put("result_1",result.get(0);
attributes.put("result_2",result.get(1));
flowFile = session.putAllAttributes(flowFile, attributes);
session.transfer(flowFile, REL_SUCCESS);
return;
}
catch (Exception e) {
session.transfer(flowFile, REL_FAILURE);
return;
}
}
}
... View more
Labels:
- Labels:
-
Apache NiFi
09-14-2022
11:43 AM
Hello I was using an updateRecord processor to concatenate several columns like so /new_columns= concat(/col1,/col2,/col3) however now the columns I need to concatenate are dynamic and I was wondering if there was a way to achieve something similar if the columns I needed to concatenate we named in an attribute. Thank you
... View more
Labels:
- Labels:
-
Apache NiFi
09-01-2022
10:37 AM
I have a csv with 50 columns, is there a way to grab a specific column by it's header name and move it in a separate flow file for further processing?
... View more
Labels:
- Labels:
-
Apache NiFi
08-31-2022
12:40 PM
I have a csv where one of the columns can sometimes come as a pair such as: Column_name 1 , 2 2.5 3.2 2.9 - 3.2 The delimiter can potentially be anything really, but there will be a delimiter. Also the values will only come as pairs. My question is, is there an efficient way to separate this one column into a flowfile where each value has it's own column, such that I have the following result: Column #1 Column #2 1 2 2.5 3.2 Thank you
... View more
Labels:
- Labels:
-
Apache NiFi
08-29-2022
10:30 AM
I switched over from one Nifi version to another and I am now getting this error in the command prompt 2022-08-29 13:16:49,926 INFO [main] org.apache.nifi.bootstrap.Command Failed to determine Process ID from [java.lang.ProcessImpl]: java.lang.Process.pid()
2022-08-29 13:16:49,926 WARN [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi but could not determined the Process ID With the following logs: 2022-08-29 13:16:49,909 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0
2022-08-29 13:16:49,918 INFO [main] org.apache.nifi.bootstrap.Command Command: C:\Program Files\Java\jre1.8.0_333\bin\java.exe -classpath
C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\conf;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\javax.servlet-api-3.1.0.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\jcl-over-slf4j-1.7.36.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\jetty-schemas-5.2.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\jul-to-slf4j-1.7.36.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\log4j-over-slf4j-1.7.36.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\logback-classic-1.2.11.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\logback-core-1.2.11.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\nifi-api-1.17.0.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\nifi-framework-api-1.17.0.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\nifi-nar-utils-1.17.0.jar;C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\lib\slf4j-api-1.7.36.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Dcurator-log-only-first-connection-issue-as-error-level=true -Djavax.security.auth.useSubjectCredsOnly=true -Djava.security.egd=file:/dev/urandom -Dzookeeper.admin.enableServer=false -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\.\conf\nifi.properties -Dnifi.bootstrap.listen.port=51521 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\bin\..\\logs org.apache.nifi.NiFi
2022-08-29 13:16:49,926 INFO [main] org.apache.nifi.bootstrap.Command Failed to determine Process ID from [java.lang.ProcessImpl]: java.lang.Process.pid()
2022-08-29 13:16:49,926 WARN [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi but could not determined the Process ID
2022-08-29 13:16:50,572 WARN [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Failed to set permissions so that only the owner can read status file C:\Users\*\DOWNLO~1\NIFI-1~2.0-B\NIFI-1~1.0\bin\..\run\nifi.status; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2022-08-29 13:16:50,576 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on p
... View more
Labels:
- Labels:
-
Apache NiFi