# Insert with the native client

Use the supplied `coordinator client` to insert literal rows or send rows from a local file. Its native protocol is CoordinatorDB-specific; a ClickHouse client cannot connect to it.

Start a server and open `./coordinator client --database data` before running the SQL below.

## Create a destination table

```sql
CREATE TABLE people(id UInt64, name String);
```

## Insert literal values

```sql
INSERT INTO people VALUES (1, 'Ada'), (2, 'Grace');
```

```sql
SELECT id, name
FROM people
ORDER BY id
FORMAT csv;
```

```text
1,"Ada"
2,"Grace"
```

## Load a client-side file

From a terminal in the directory containing the executable, create a CSV file and load it:

```sh
printf '3,Linus\n' > people.csv
./coordinator client --database data --query "INSERT INTO people FROM INFILE 'people.csv' FORMAT csv" > /dev/null
```

The file is read on the client machine. Relative paths use the client's working directory. Every matched file retains its own headers or container boundary during decoding.

A subsequent query of `people` includes `(3, 'Linus')`. The `UInt64` and String declarations validate file values just as they validate SQL values.

See [`INSERT INTO`](https://coordinatordb.com/docs/reference/statements/insert-into) and [batch inserts](https://coordinatordb.com/docs/concepts/features/operations/insert/bulkinserts) for stdin, compressed files and larger inputs.
