Connecting to SingleStore
Prerequisites
- The SingleStore instance is accessible over the network from the PuppyGraph instance.
Configuration
| Configuration | Explanation |
|---|---|
| Username | The username of the database |
| Password | The password of the database |
| JDBC URI | A JDBC compatible connection URI of the data source. Read this page for more details on how to construct the URI. Add tinyInt1isBit=false; see Data Type Mapping. |
| JDBC Driver Class | The class name of the JDBC Driver. The default value is |
| JDBC Driver URL | The URL of the SingleStore-compatible JDBC Driver. Please choose the version of the driver that is compatible with your SingleStore database. |
Data Type Mapping
| SingleStore Type | PuppyGraph Type | Description |
|---|---|---|
BIT |
Boolean |
True or false |
BOOLEAN, BOOL, TINYINT(1) |
Byte |
8-bit signed integer (-128 to 127). BOOLEAN is stored as TINYINT(1), so true and false read as 1 and 0, and other stored values such as 2 read as they are |
TINYINT |
Byte |
8-bit signed integer |
TINYINT UNSIGNED |
Short |
Widened to hold the unsigned range |
SMALLINT |
Short |
16-bit signed integer |
SMALLINT UNSIGNED |
Int |
Widened to hold the unsigned range |
MEDIUMINT, INT |
Int |
32-bit signed integer |
MEDIUMINT UNSIGNED, INT UNSIGNED |
Long |
Widened to hold the unsigned range |
BIGINT |
Long |
64-bit signed integer |
BIGINT UNSIGNED |
HugeInt |
Widened to hold the unsigned range |
FLOAT |
Float |
32-bit IEEE 754 floating point |
DOUBLE, REAL |
Double |
64-bit IEEE 754 floating point. REAL is a synonym for DOUBLE in SingleStore |
DECIMAL(P, S), NUMERIC(P, S) |
Decimal(P, S) |
Fixed-point decimal; precision P, scale S |
CHAR, VARCHAR, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT |
String |
Character strings |
JSON |
String |
JSON document as text |
ENUM, SET |
String |
Read as text |
DATE |
Date |
Calendar date without time or timezone |
DATETIME, TIMESTAMP |
DateTime |
Date and time |
- Add
tinyInt1isBit=falseto the JDBC URI, for examplejdbc:singlestore://<host>:3306/<database>?tinyInt1isBit=false. The mapping above assumes it. With the driver's default (true), everyTINYINTcolumn, not onlyTINYINT(1), is reported as a boolean, and queries that read such a column fail. VECTORcolumns are listed asString, but queries that read them fail, because SingleStore returns vector values as binary. Do not add them to a node or edge as attributes.- Columns of any other type, such as
TIME,BLOB,VARBINARYor the geospatial types, are not supported. They are listed in Schema Builder, but you cannot add them to a node or edge as attributes.
If you need a data type that is not supported, or one that is not listed here, contact us.
Demo
See Querying SingleStore Data as a Graph for a complete demo for SingleStore. The demo includes setting up the connection to a SingleStore instance.