<a id="sftp-schemaless-json-source-connector"></a>

# Schemaless JSON Source Connector for Confluent Platform

Kafka Connect Schemaless JSON Source connector is used to [stream JSON files](https://en.wikipedia.org/wiki/JSON_Streaming)  from an SFTP directory. It will not try to convert the JSON records to a schema. The recommended converter to use is the [StringConverter](/platform/current/connect/concepts.html#converters).

```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 as shown below:

```properties
connector.class=io.confluent.connect.sftp.SftpSchemaLessJsonSourceConnector
```

<a id="sftp-schemaless-json-source-connector-example"></a>

## JSON Schemaless Source Connector Example

This example follows the same steps as the Quick Start. Review the [Quick Start](overview.md#sftp-source-connector-quickstart) for help running the Confluent Platform and installing the SFTP connector package.

Prerequisites
: - [Confluent Platform](/platform/current/installation/index.html)
  - [Confluent CLI](https://docs.confluent.io/confluent-cli/current/installing.html) (requires separate installation)

1. Generate a JSON dataset using the command below:
   ```bash
   echo $'{"id":1,"first_name":"Roscoe","last_name":"Brentnall","email":"rbrentnall0@mediafire.com","gender":"Male","ip_address":"202.84.142.254","last_login":"2018-02-12T06:26:23Z","account_balance":1450.68,"country":"CZ","favorite_color":"#4eaefa"}\n{"id":2,"first_name":"Gregoire","last_name":"Fentem","email":"gfentem1@nsw.gov.au","gender":"Male","ip_address":"221.159.106.63","last_login":"2015-03-27T00:29:56Z","account_balance":1392.37,"country":"ID","favorite_color":"#e8f686"}' > "json-sftp-source.json"
   ```
2. Create an `sftp.properties` file with the following contents:
   ```properties
   name=SchemaLessJsonSftp
   tasks.max=1
   connector.class=io.confluent.connect.sftp.SftpSchemaLessJsonSourceConnector
   input.path=/path/to/data
   error.path=/path/to/error
   finished.path=/path/to/finished
   input.file.pattern=json-sftp-source.json
   behavior.on.error=IGNORE
   sftp.username=username
   sftp.password=password
   sftp.host=localhost
   sftp.port=22
   kafka.topic=sftp-schemaless-json-topic
   value.converter=org.apache.kafka.connect.storage.StringConverter
   ```
3. Load the SFTP Schemaless JSON Source connector using the Confluent CLI [confluent local services connect connector load](https://docs.confluent.io/confluent-cli/current/command-reference/local/services/connect/connector/confluent_local_services_connect_connector_load.html) command.
   ```bash
   confluent local load SchemaLessJsonSftp --config sftp.properties
   ```

   #### IMPORTANT
   - The [confluent local](https://docs.confluent.io/confluent-cli/current/command-reference/local/index.html) commands are intended for a single-node development environment and
     are not suitable for a production environment. The data that are produced are transient and are intended to be
     temporary. For production-ready workflows, see [Install and Upgrade Confluent Platform](/platform/current/installation/index.html).

<a id="sftp-schemaless-json-source-connector-config"></a>

## Configuration Properties

For connector-specific configuration properties, see
[SFTP Source Connector Configuration Properties](license_config.md#sftp-source-connector-license-config)
