avatica alternatives and similar packages
Based on the "Relational Databases" category.
Alternatively, view avatica alternatives based on common mentions on social networks and blogs.
9.8 5.7 avatica VS go-sql-driver/mysqlGo MySQL Driver is a MySQL driver for Go's (golang) database/sql package
4.2 3.8 avatica VS vertica-sql-goOfficial native Go client for the Vertica Analytics Database.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of avatica or a related project?
This repository has moved to apache/calcite-avatica-go.
Development will continue in the new repository.
We recommend updating your import paths from
This repository will be archived, but will still be readable for backwards compatibility.
Apache Phoenix/Avatica SQL Driver
An Apache Phoenix/Avatica driver for Go's database/sql package
Install using the go tool or your dependency management tool:
$ go get github.com/Boostport/avatica
The Phoenix/Avatica driver implements Go's
database/sql/driver interface, so, import Go's
database/sql package and the driver:
import "database/sql" import _ "github.com/Boostport/avatica" db, err := sql.Open("avatica", "http://localhost:8765")
Then simply use the database connection to query some data, for example:
rows := db.Query("SELECT COUNT(*) FROM test")
DSN (Data Source Name)
The DSN has the following format (optional parts are marked by square brackets):
In other words, the scheme (http), address and port is mandatory, but the schema and parameters are optional.
This is the JDBC username that is passed directly to the backing database. It is NOT used for authenticating against Avatica.
This is the JDBC password that is passed directly to the backing database. It is NOT used for authenticating against Avatica.
schema path sets the default schema to use for this connection. For example, if you set it to
then executing the query
SELECT * FROM my_table will have the equivalence of
SELECT * FROM myschema.my_table.
If schema is set, you can still work on tables in other schemas by supplying a schema prefix:
SELECT * FROM myotherschema.my_other_table.
The following parameters are supported:
The authentication type to use when authenticating against Avatica. Valid values are
BASIC for HTTP Basic authentication,
DIGEST for HTTP Digest authentication, and
SPNEGO for Kerberos with SPNEGO authentication.
The user to use when authenticating against Avatica. This parameter is required if
The password to use when authenticating against Avatica. This parameter is required if
The Kerberos principal to use when authenticating against Avatica. It should be in the form
primary/[email protected], where
the instance is optional. This parameter is required if
SPNEGO and you want the driver to perform the
The path to the Kerberos keytab to use when authenticating against Avatica. This parameter is required if
SPNEGO and you want the driver to perform the Kerberos login.
The path to the Kerberos configuration to use when authenticating against Avatica. This parameter is required if
SPNEGO and you want the driver to perform the Kerberos login.
The path to the Kerberos credential cache file to use when authenticating against Avatica. This parameter is required if
SPNEGO and you have logged into Kerberos already and want the driver to use the existing credentials.
location will be set as the location of unserialized
time.Time values. It must be a valid timezone.
If you want to use the local timezone, use
Local. By default, this is set to
maxRowsTotal parameter sets the maximum number of rows to return for a given query. By default, this is set to
-1, so that there is no limit on the number of rows returned.
frameMaxSize parameter sets the maximum number of rows to return in a frame. Depending on the number of rows
returned and subject to the limits of
maxRowsTotal, a query result set can contain rows in multiple frames. These
additional frames are then fetched on a as-needed basis.
frameMaxSize allows you to control the number of rows
in each frame to suit your application's performance profile. By default this is set to
-1, so that there is no limit
on the number of rows in a frame.
transactionIsolation allows you to set the isolation level for transactions using the connection. The value
should be a positive integer analogous to the transaction levels defined by the JDBC specification. The default value
0, which means transactions are not supported. This is to deal with the fact that Calcite/Avatica works with
many types of backends, with some backends having no transaction support. If you are using Apache Phoenix 4.7 onwards,
we recommend setting it to
4, which is the maximum isolation level supported.
The supported values for
|0||none||Transactions are not supported|
||Dirty reads, non-repeatable reads and phantom reads may occur.|
||Dirty reads are prevented, but non-repeatable reads and phantom reads may occur.|
||Dirty reads and non-repeatable reads are prevented, but phantom reads may occur.|
||Dirty reads, non-repeatable reads, and phantom reads are all prevented.|
The following Phoenix/Avatica datatypes are automatically converted to and from
It is important to understand that avatica and the underlying database ignores the timezone. If you save a
to the database, the timezone is ignored and vice-versa. This is why you need to make sure the
in your DSN is set to the same value as the location of the
time.Time values you are inserting into the database.
We recommend using
UTC, which is the default value of
|Driver Version||Phoenix Version||Calcite-Avatica Version|
|1.x.x||>= 4.8.0||>= 1.8.0|
|2.x.x||>= 4.8.0||>= 1.8.0|
To run tests, but skip tests in the vendor directory, run:
go test $(go list ./... | grep -v /vendor/)
The driver is not feature-complete yet, so contributions are very appreciated.
Updating protocol buffer definitions
To update the procotol buffer definitions, update
gen-protobuf.sh to match
the version included by Phoenix and then run the appropriate script for your platform.
About the moby.yml file
The moby.yml file is used by our internal tool to automatically reload and test the code during development. We hope to have this tool open-sourced soon.
The driver is licensed under the Apache 2 license.
*Note that all licence references and agreements mentioned in the avatica README section above are relevant to that project's source code only.