https://github.com/pooulad/csv-2-sql-example
🚨This program is written with GO to show how to read csv files and register them in the database
https://github.com/pooulad/csv-2-sql-example
csv-parser golang
Last synced: 24 days ago
JSON representation
🚨This program is written with GO to show how to read csv files and register them in the database
- Host: GitHub
- URL: https://github.com/pooulad/csv-2-sql-example
- Owner: pooulad
- License: mit
- Created: 2023-10-24T00:37:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-27T15:49:57.000Z (over 1 year ago)
- Last Synced: 2025-04-02T08:08:44.748Z (2 months ago)
- Topics: csv-parser, golang
- Language: Go
- Homepage:
- Size: 3.42 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Introduction👨💻
This program is written with GO to show how to read csv files and register them in the database
**flags**
```
-config=config.json or --config=config.json
-file=file.csv or --file.csv=file.csv
```
config includes db information for insert csv
```json
{
"username": "postgres",
"password": "postgres",
"host": "localhost",
"name": "exel2sqldb",
"ssl": "disable"
}
```## Examples
**Windows**
```
go run main.go -file=C:\file\path\username.csvOR
.\build.exe -file=C:\file\path\username.csv
```**Linux**
```
go run main.go -file=/file/path/username.csvOR
wine start -file=/file/path/username.csv
```## Tech Stack
**Database:** postgresql
**Lang:** GO
github.com/savioxavier/termlink v1.3.0
github.com/lib/pq## Authors
- [@pooulad](https://www.github.com/pooulad)
- [@hossein1376](https://www.github.com/hossein1376)
## Demo