QueryCSV enables you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to a CSV file

Overview

QueryCSV

enable you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to CSV file

Why

it's started with this task that I need to merge 30 CSV file into one file and group it by day instead of the hour, I wrote a couple of lines of code to do that, but I knew it is not going to be the last task that I will need to manipulate the CSV files, so wrote this cmd app to help me on this kind of tasks, I hope that could help too.

Install

go get github.com/m7shapan/querycsv

or download Binaries from releases page

How to use

➜ firstgroup = load group_a.csv
- loading file group_a.csv
+---------+-----+
|  name   | age |
+---------+-----+
| Mohamed |  26 |
| Asma    |  26 |
| Ahmed   |  23 |
+---------+-----+
➜ secondgroup = load group_b.csv
- loading file group_b.csv
+---------+-----+
|  name   | age |
+---------+-----+
| mahmoud |  24 |
| sara    |  22 |
| khaled  |  23 |
+---------+-----+
➜ groups = select * from firstgroup
➜ groups += select name, age from secondgroup
➜ show groups 10
+---------+-----+
|  name   | age |
+---------+-----+
| Mohamed |  26 |
| Asma    |  26 |
| Ahmed   |  23 |
| mahmoud |  24 |
| sara    |  22 |
| khaled  |  23 |
+---------+-----+
➜ group_by_age = select age, count(*) as count from groups group by age
➜ show group_by_age
error: wrong number of command parameters expected 2, found 1
➜ show group_by_age 10
+-----+-------+
| age | count |
+-----+-------+
|  22 |     1 |
|  23 |     2 |
|  24 |     1 |
|  26 |     2 |
+-----+-------+
➜ export group_by_age final_group.csv
file exported

Commands

load [file.csv]    load only one file or all directory files in case of directory all files should be of the same csv structure

    example:
    testtable = load path/to/file.csv
    testtable = load path/to/files


list    list all existed tables name


show [tablename] [limit] print table data use the limit to limit rows number 

    example:
    show testtable 10


export [tablename] [path/to/exported/file.csv]

    example:
    export testtable testtable.csv

Contact

Mohamed Shapan @m7shapan

Owner
Mohamed Shapan
Mohamed Shapan
Allows parsing CSV files into custom structs and implements required fields that can't be empty

Welcome to Go Custom CSV Parser ?? Allows parsing CSV files into custom structs and implements required fields that can't be empty ?? Homepage Install

Elmedin Turkeš 2 Nov 9, 2021
Embed arbitrary resources into a go executable at runtime, after the executable has been built.

ember Ember is a lightweight library and tool for embedding arbitrary resources into a go executable at runtime. The resources don't need to exist at

null 54 May 17, 2022
csv reader/writer and csv generator.

IO csv reader sample version 0.0.1-SNAPSHOT Goals: main: read huge file, hex substring, write to new file. repo has 2 version. v1 can read a file and

Cranes Team 2 Nov 4, 2021
Read csv file from go using tags

go-csv-tag Read csv file from Go using tags The project is in maintenance mode. It is kept compatible with changes in the Go ecosystem but no new feat

Louis 94 Apr 9, 2022
Load GTFS files in golang

go-gtfs Load GTFS files in Go. The project is in maintenance mode. It is kept compatible with changes in the Go ecosystem but no new features will be

Louis 32 Mar 5, 2022
Extract profiles and tasks information from CSV file

Footsite-Bot ideas from jw6602 Extract profiles and tasks information from CSV f

Zhiyao Wen 6 May 18, 2022
Simple go script that converts csv file into a json document

csv-go-parser Simple go script that converts csv file into a json document. CSV Input: id,first_name,last_name,email,avatar,ip_address 1,Pauline,Hirth

Martin Patino 1 Jun 4, 2022
Read data from rss, convert in pdf and send to kindle. Amazon automatically convert them in azw3.

Kindle-RSS-PDF-AZW3 The Kindle RSS PDF AZW3 is a personal project. The Kindle RSS PDF AZW3 is a personal project. I received a Kindle for Christmas, a

Elia 0 Jan 10, 2022
This program let you create a DataSet (.CSV) with all TedTalks

TedTalks-Scraper This program let you create a file .CSV with all information from TedTalks, including: Title Description Views (Number of Views) Auth

null 0 Dec 26, 2021
app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files

app-services-go-linter app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files. A

Red Hat Developer 2 Nov 29, 2021
Provide an upload endpoint that stores files on pinata and returns a json response with the uploaded file pinata url

Purpose Build a template repository to get to coding as quickly as possible, by starting from a common template which follows the guidelines here Feat

Dathan Vance Pattishall 0 Dec 30, 2021
🌳 Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

?? Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

Rob Muhlestein 2 Apr 12, 2022
go-fastdfs 是一个简单的分布式文件系统(私有云存储),具有无中心、高性能,高可靠,免维护等优点,支持断点续传,分块上传,小文件合并,自动同步,自动修复。Go-fastdfs is a simple distributed file system (private cloud storage), with no center, high performance, high reliability, maintenance free and other advantages, support breakpoint continuation, block upload, small file merge, automatic synchronization, automatic repair.(similar fastdfs).

中文 English 愿景:为用户提供最简单、可靠、高效的分布式文件系统。 go-fastdfs是一个基于http协议的分布式文件系统,它基于大道至简的设计理念,一切从简设计,使得它的运维及扩展变得更加简单,它具有高性能、高可靠、无中心、免维护等优点。 大家担心的是这么简单的文件系统,靠不靠谱,可不

小张 3.2k Jun 30, 2022
Split text files into gzip files with x lines

hakgzsplit split lines of text into multiple gzip files

Luke Stephens (hakluke) 6 Jun 21, 2022
Easily create Go files from stub files

go-stubs Easily create .go files from stub files in your projects. Usage go get github.com/nwby/go-stubs Create a stub file: package stubs type {{.Mo

Sam Newby 4 Jan 27, 2022
A tool for moving files into directories by file extensions

The tool for moving files into directories by file extensions Example before moving structure: moving into same extension dir result: moving into diff

Uladzislau Jum 0 Dec 6, 2021
gsheet is a CLI tool (and Golang package) for piping csv data to and from Google Sheets

gsheet Table of Contents Introduction Why? Installation Authentication and Authorization What about OAuth authentication? CLI Usage Sheet commands Dri

chris 17 Jun 21, 2022
A simple utility for validating CSV columns

gompare A simple utility for validating CSV columns Building In project directly, run go build Usage ./gompare --template-file=template.csv --input-fi

null 3 Feb 3, 2022