.. _spooldir_schemaless_json_source_connector: ================================ Schemaless JSON Source Connector ================================ This connector is used to `stream JSON files `_ from a directory. It will not try to convert the JSON records to a schema. The recommended converter to use is the **StringConverter**. .. codewithvars:: properties value.converter=org.apache.kafka.connect.storage.StringConverter To use this connector, use a connector configuration that specifies the name of this connector class in the ``connector.class`` configuration property: .. codewithvars:: properties connector.class=com.github.jcustenborder.kafka.connect.spooldir.SpoolDirSchemaLessJsonSourceConnector The other connector-specific configuration properties are described below. .. _spooldir_schemaless_json_source_connector_example: JSON Schemaless Source Connector Example ---------------------------------------- This example follows the same steps as the Quick Start. Review the Quick Start for help running the |cp| and installing the Spool Dir connectors. .. include:: ../../../includes/install-cli-prereqs.rst #. Generate a JSON dataset using the command below: .. codewithvars:: bash curl "https://api.mockaroo.com/api/17c84440?count=500&key=25fd9c80" > "json-spooldir-source.json" #. Create a ``spooldir.properties`` file with the following contents: .. codewithvars:: properties name=SchemaLessJsonSpoolDir tasks.max=1 connector.class=com.github.jcustenborder.kafka.connect.spooldir.SpoolDirSchemaLessJsonSourceConnector input.path=/path/to/data input.file.pattern=json-spooldir-source.json error.path=/path/to/error finished.path=/path/to/finished halt.on.error=false topic=spooldir-schemaless-json-topic value.converter=org.apache.kafka.connect.storage.StringConverter #. Load the SpoolDir Schemaless JSON Source Connector using the |confluent-cli| :ref:`confluent_local_load` command. .. include:: ../../../includes/confluent-local-consume-limit.rst .. codewithvars:: bash |confluent_load| spooldir|dash| -d spooldir.properties .. include:: ../../../includes/cli.rst :start-after: cli_limitations_start :end-before: cli_limitations_end .. _spooldir_schemaless_json_source_connector_config: Configuration Properties ------------------------ .. include:: includes/common_config.rst .. include:: includes/common_file_system_config.rst .. include:: includes/common_timestamp_config.rst