Skip to content

Instantly share code, notes, and snippets.

@datadidit
datadidit / ConvertCSVToJSON.java
Created December 19, 2016 02:48
Example CSV to JSON Apache NiFi Custom Processor and tests.
/*
* 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
*
@datadidit
datadidit / CSVToJson.java
Last active December 13, 2016 11:37
Gist for my wordpress blog post on a CSV to Mongo insert with Apache Camel
package datadidit.helpful.hints.camel;
import java.io.IOException;
import java.io.InputStream;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;