Skip to content

Commit b2515fe

Browse files
feat: ToC entries for new import options
1 parent 542381d commit b2515fe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: README.md

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ A fast data generator that produces CSV files from generated relational data.
77
## Table of Contents
88
1. [Installation](#installation)
99
1. [Usage](#usage)
10+
* Import via [HTTP](#import-via-http)
11+
* Import via [psql](#import-via-psql)
12+
* Import via [nodelocal](#import-via-nodelocal)
1013
1. [Tables](#tables)
1114
* [gen](#gen)
1215
* [set](#set)
@@ -144,6 +147,8 @@ your_output_dir
144147
└── person_type.csv
145148
```
146149

150+
##### [Import via HTTP]
151+
147152
Then import the files as you would any other; here's an example insert into CockroachDB:
148153

149154
``` sql
@@ -172,13 +177,17 @@ CSV DATA (
172177
WITH skip='1', nullif = '', allow_quoted_null;
173178
```
174179

180+
##### [Import via psql]
181+
175182
If you're working with a remote database and have access to the `psql` binary, try importing the CSV file as follows:
176183

177184
``` sh
178185
psql "postgres://root@localhost:26257/defaultdb?sslmode=disable" \
179186
-c "\COPY public.person (id, full_name, date_of_birth, user_type, favourite_animal) FROM './csvs/person/person.csv' WITH DELIMITER ',' CSV HEADER NULL E''"
180187
```
181188

189+
##### [Import via nodelocal]
190+
182191
If you're working with a remote database and have access to the `cockroach` binary, try importing the CSV file as follows:
183192

184193
``` sh

0 commit comments

Comments
 (0)