Skip to main content

GBase 8a

Doris JDBC Catalog supports connecting to GBase 8a databases through the standard JDBC interface. This document describes how to configure a GBase 8a database connection.

remarks

This is an experimental feature.

Instructions for use​

To connect to a GBase 8a database you need

  • GBase 8a database.

  • JDBC driver for GBase 8a database, you can download the latest or specified version of the GBase JDBC driver from the GBase official website.

  • Doris Network connection between each FE and BE node and the GBase 8a server, default port is 5258.

Notice

When this Catalog is tested against GBase 8a, the versions used are as follows:

  • GBase 8a: GBase8a_MPP_Cluster-NoLicense-FREE-9.5.3.28.12-redhat7-x86_64
  • JDBC driver: gbase-connector-java-9.5.0.7-build1-bin.jar Other versions have not been tested and may have compatibility issues.

Connect to GBase 8a​

CREATE CATALOG `gbase` PROPERTIES (
"user" = "root",
"type" = "jdbc",
"password" = "secret",
"jdbc_url" = "jdbc:gbase://127.0.0.1:5258/doris_test",
"driver_url" = "gbase-connector-java-9.5.0.7-build1-bin.jar",
"driver_class" = "com.gbase.jdbc.Driver"
); """
remarks

jdbc_url defines the connection information and parameters to be passed to the GBase 8a JDBC driver. You can check the supported URL parameters from the GBase official website.

Hierarchical mapping​

When mapping GBase 8a, a Database in Doris corresponds to a Database in GBase 8a. The Table under Doris' Database corresponds to the Tables under the Database in GBase 8a. That is, the mapping relationship is as follows:

DorisGBase 8a
CatalogGBase 8a Server
DatabaseDatabase
TableTable

Type mapping​

GBase 8a to Doris type mapping​

GBase 8a TypeDoris TypeComment
TINYINTTINYINT
SMALLINTSMALLINT
INTINT
BIGINTBIGINT
realFLOAT
FLOATDOUBLE
DECIMALDECIMAL
NUMERICDECIMAL
CHARCHAR
VARCHARSTRING
TEXTSTRING
DATEDATE
DATETIMEDATETIME
TIMESTRING
TIMESTAMPDATETIME
OtherUNSUPPORTED

Query optimization​

Predicate pushdown​

When executing a query like where dt = '2022-01-01', Doris can push these filtering conditions down to the external data source, thereby directly excluding data that does not meet the conditions at the data source level, reducing inaccuracies. Necessary data acquisition and transmission. This greatly improves query performance while also reducing load on external data sources.

Row limit​

If you have the limit keyword in the query, Doris will push the limit down to GBase 8a to reduce the amount of data transfer.

Escape characters​

Doris will automatically add the escape character (``) to the field names and table names in the query statements sent to GBase 8a to avoid conflicts between the field names and table names and GBase 8a internal keywords.