Skip to content

Repository files navigation

ElasticSearch SQL Client

GitHub branch check runsGitHub go.mod Go versionStatic BadgeStatic BadgeStatic BadgeStatic Badge

Example usage

logger:=log.StandardLogger()
lvl, _:=log.ParseLevel("trace")
logger.SetLevel(lvl)
client:=CreateWithBaseUrl(
context.Background(),
"http://localhost:9200",
nil,
)
_, err:=client.Version(nil)
iferr!=nil {
panic(err)
}
client.SetLogger(logger)
result, err:=client.SqlQuery(`SELECT * FROM kibana_sample_data_ecommerce WHERE "category" = 'Men''s Shoes' LIMIT 2`)
iferr!=nil {
panic(err)
}
b, err:=json.Marshal(result.Rows)
fmt.Printf("result: %s\n", string(b))

About

SQL client for Ylem to work with Elasticsearch as data source

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages