Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 4 hours 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 (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-27T15:49:57.000Z (about 1 year ago)
- Last Synced: 2023-11-21T04:31:55.045Z (12 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![Screenshot 2023-10-24 211725](https://github.com/pooulad/csv-2-sql-example/assets/86445458/57dd39e1-9929-4a8c-8223-6f83167d23de)