s3-select-example

module
v0.0.0-...-0b164cc Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0

README

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.

Directories

Path Synopsis
client
cmd

Jump to

Keyboard shortcuts

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