Skip to content

mihai-chiorean/s3-select-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3-select-example

Example usage of S3 Select from Go

https://dev.to/mihaichiorean/querying-csv-files-in-aws-s3-from-go-56kf

Command line tool

In this codebase I've also added a very basic command line tool that can be used to run (test?) SQL queries against a CSV in S3.

It will pick up AWS env vars or config file (~/.aws/credentials)

Install

git clone https://github.com/mihai-chiorean/s3-select-example.git && cd s3-select-example/cmd/s3ql

and run

go install

Usage

s3ql --help

s3ql --bucket <bucket> --key FL_insurance_sample.csv --region us-east-2 select \* from s3object s where s.statecode = \'FL\'

Will print out, line by line, the json output of each matched record in the CSV.

About

Example usage of S3 Select from Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages