uzimith / athena_schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

athena-schema

Generate an athena (presto) table definition from a golang strcut.

Install

go get github.com/uzimith/athena_schema/cmd/athena_schema

Usage

cd fixture
athena_schema -type=User,Post

This application need a template file in order to run this command.

type Post struct {
	Author    User      `test:"" json:"author_info"` # name priority: json tag > camel case field name
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt string    `athena:"timestamp"` # type overwrite by athena struct tag
}

About


Languages

Language:Go 85.8%Language:TSQL 11.2%Language:Smarty 3.1%