[
https://issues.apache.org/jira/browse/NIFI-3404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16024043#comment-16024043
]
ASF GitHub Bot commented on NIFI-3404:
--------------------------------------
Github user ijokarumawak commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1830#discussion_r118404133
--- Diff:
nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/SimpleCsvFileLookupService.java
---
@@ -0,0 +1,223 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.lookup;
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.CSVRecord;
+import org.apache.commons.lang3.StringUtils;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnEnabled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.controller.AbstractControllerService;
+import org.apache.nifi.controller.ControllerServiceInitializationContext;
+import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.reporting.InitializationException;
+import org.apache.nifi.util.file.monitor.LastModifiedMonitor;
+import org.apache.nifi.util.file.monitor.SynchronousFileWatcher;
+
+@Tags({"lookup", "cache", "enrich", "join", "csv", "reloadable", "key",
"value"})
+@CapabilityDescription("A reloadable properties file-based lookup service")
--- End diff --
"CSV file-based" instead of "properties".
> Add lookup processor for enrichments/joins to reference data
> ------------------------------------------------------------
>
> Key: NIFI-3404
> URL: https://issues.apache.org/jira/browse/NIFI-3404
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Joey Frazee
> Assignee: Joey Frazee
>
> NiFi doesn't currently have an easy, concise way of doing enrichment, joining
> against reference data sets or performing attribute lookups against external
> data sources.
> Since enrichments and joins are basic streaming use cases, and since
> attributes and EL are often used to parameterize processor properties, there
> is a need for an easy way to do enrichments, joins and lookups without having
> to write code or create a lengthy data flow.
> There's been some discussion of this on the mailing list [1] and I've started
> work on a LookupAttribute [2] processor that delegates the work to controller
> services.
> 1.
> https://lists.apache.org/thread.html/74321ff0e9e0b7339e43ad53b36119315dc5094991605edfb12b34d0@%3Cdev.nifi.apache.org%3E
> 2. https://github.com/jfrazee/nifi-lookup-service
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)