45.3.1ETL Importer Processors

 

ETL Importer Processors require the ETL Importer (ETL_IMPORTER) module.

45.3.2ETL Importer: CSV Processor

 
  • Example URI: smile:etl_importer/csvProcessor
  • Description: This processor submits csv strings to an ETL Import Module for processing.

45.3.2.1Example Route: csvProcessor With CSV File

Use the steps below to send a .csv file to a csvProcessor using Camel's File Component.

  1. Add an ETL Import Module using the Web Admin Console.
  2. Add the sample handleEtlImportRow function from the documentation.
  3. Create a new .csv file using the sample data from the documentation.
  4. Add the route below to the Camel module:
<routes xmlns="http://camel.apache.org/schema/spring">
	<route>
		<from uri="file:[directory-from-step-3-above]?fileName=[filename-from-step-3-above.csv]&amp;noop=true"/>
		<convertBodyTo type="String"/>
		<to uri="smile:etl_importer/csvProcessor"/>
	</route>
</routes>

45.3.2.2Example Route: csvProcessor With Kafka

The following route reads a multi-line CSV String (including headers) from the Kafka etl-in-topic topic and sends it to be processed by an ETL Import Module with an id of etl_importer.

<routes xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="kafka:etl-in-topic?brokers=localhost:9092"/>
        <to uri="smile:etl_importer/csvProcessor"/>
    </route>
</routes>