batch_insert

command module
v0.0.0-...-bbc21fb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

README

tool: insert data from csv into database

  • insert data into users table of the database.

ready

  1. install direnv

usage

  1. create .env file following .env.template
  2. run direnv allow . in this directory.
  3. check environment variable DSN is setted by running echo $DSN.
  4. create your *.csv file following example.csv file. and check comment.
  5. run your database by docker compose up -d in root directory of this repository.
  6. run go run main.go ${path_to_your_csv_file} in this directory.
    • e.g. go run main.go example.csv

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL