gohive

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

README

GoHive: A Go database/sql Driver for Hive

Build Status

To access databases, Go programmers call the standard library database/sql, which relies on drivers to talk to database management systems. GoHive is such a driver that talks to Hive via HiveServer2, a Thrift server.

We found many open source Hive clients in Go. However we cannot find one completely compatible with the database/sql driver interface define in Go's standard library, so we developed our own solution and will continue to maintain and improve this project in the long run.

For Users

GoHive is go-gettable. Please run the following command to install it:

go get sqlflow.org/gohive

sqlflow.org/gohive is a vanity import path of GoHive.

For Developers

Your contribution to GoHive is very welcome! Please refer to this document on how to build and test GoHive in a Docker container.

License

GoHive comes with Apache License 2.0.

Acknowledgement

This implementation is strongly inspired by https://github.com/derekgr/hivething.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	User       string
	Passwd     string
	Addr       string
	DBName     string
	Auth       string
	Batch      int
	SessionCfg map[string]string
}

func ParseDSN

func ParseDSN(dsn string) (*Config, error)

ParseDSN requires DSN names in the format [user[:password]@]addr/dbname.

func (*Config) FormatDSN

func (cfg *Config) FormatDSN() string

FormatDSN outputs a string in the format "user:password@address?auth=xxx"

Directories

Path Synopsis
hiveserver2

Jump to

Keyboard shortcuts

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