CrateDB
This is the implementation of the CrateDB data handler for MindsDB.
CrateDB is a distributed SQL database management system that integrates a fully searchable document-oriented data store. It is open-source, written in Java, based on a shared-nothing architecture, and designed for high scalability. CrateDB includes components from Lucene, Elasticsearch and Netty.
Prerequisites
Before proceeding, ensure the following prerequisites are met:
- Install MindsDB locally via Docker or use MindsDB Cloud.
- To connect CrateDB to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to CrateDB.
Implementation
This handler is implemented using crate
, a Python library that allows you to use Python code to run SQL commands on CrateDB.
The required arguments to establish a connection are as follows:
user
is the username associated with the database.password
is the password to authenticate your access.host
is the hostname or IP adress of the server.port
is the port through which connection is to be made.schema_name
is schema name to get tables from. Defaults todoc
.
Usage
In order to make use of this handler and connect to the CrateDB database in MindsDB, the following syntax can be used:
You can use this established connection to query your table as follows: