CrateDB#
The CrateDB node allows you to automate work in CrateDB, and integrate CrateDB with other applications. n8n has built-in support for a wide range of CrateDB features, including executing, inserting, and updating rows in the database.
On this page, you'll find a list of operations the CrateDB node supports and links to more resources.
Credentials
Refer to CrateDB credentials for guidance on setting up authentication.
Examples and templates
For usage examples and templates to help you get started, take a look at n8n's CrateDB integrations list.
Basic Operations#
- Execute an SQL query
- Insert rows in database
- Update rows in database
Example Usage#
This workflow allows you to create a table and insert data into it in CrateDB. You can also find the workflow on n8n.io. This example usage workflow would use the following nodes. - Start - Set - CrateDB
The final workflow should look like the following image.
1. Start node#
The start node exists by default when you create a new workflow.
2. CrateDB node (Execute Query)#
- First of all, you'll have to enter credentials for the CrateDB node. You can find out how to do that here.
- Select 'Execute Query' from the Operation dropdown list.
- Enter the following SQL query in the Query field:
CREATE TABLE test (id INT, name STRING);
. - Click on the Node tab and toggle Always Output Data to true.
- Click on Execute Node to run the node.
3. Set node#
- Click on the Add Value button and select 'Number' from the dropdown list.
- Enter
id
in the Name field. - Click on the Add Value button and select 'String' from the dropdown list.
- Enter
name
in the Name field. - Enter the value for the name in the Value field.
- Click on Execute Node to run the node.
4. CrateDB1 node (Insert)#
- Select the credentials that you entered in the previous CrateDB node.
- Enter
test
in the Table field. - Enter
id, name
in the Columns field. - Click on Execute Node to run the node.
FAQs#
How to specify the data type of a column?#
To specify the data type of a column, append the column name with :type
, where type
is the data type of that column. For example, if you want to specify the type int
for the column id and type text
for the column name, you can use the following snippet in the Columns field: id:init,name:text
.