Automate QuestDB Table Creation and Data Insertion with n8n
detail.loadingPreview
This n8n workflow automates the creation of a 'test' table in QuestDB and then populates it with sample data. It's a foundational example for integrating your data pipelines with QuestDB.
About This Workflow
This n8n workflow demonstrates a streamlined approach to managing your QuestDB database. It begins with a manual trigger, allowing you to initiate the process on demand. The workflow then proceeds to create a new table named 'test' within your QuestDB instance, defining columns for 'id' (integer) and 'name' (string). Subsequently, it populates this table with a record containing a specific ID and the name 'Tanay'. Finally, it retrieves and outputs the data from the 'test' table, providing immediate confirmation of the successful operation. This workflow is an excellent starting point for anyone looking to automate database interactions with QuestDB.
Key Features
- Manual Trigger: Initiate the workflow with a single click.
- Automated Table Creation: Dynamically create tables in QuestDB.
- Data Insertion: Programmatically add records to your tables.
- Data Retrieval: Fetch and verify data from QuestDB.
- QuestDB Integration: Seamlessly connect with QuestDB for time-series data management.
How To Use
- Add Manual Trigger: Start by adding the 'On clicking 'execute'' node to your n8n canvas.
- Create QuestDB Table: Connect the manual trigger to a 'QuestDB' node. Configure the 'QuestDB' node with the following parameters:
- Operation:
executeQuery - Query:
CREATE TABLE test (id INT, name STRING); - Credentials: Select your QuestDB credentials.
- Operation:
- Set Data: Connect the 'QuestDB' node to a 'Set' node. Configure the 'Set' node:
- Values: Add a new string value named 'name' with the value 'Tanay'. Add a new number value named 'id' (n8n will likely auto-generate a placeholder for this, which can be manually set or dynamically sourced later).
- Insert Data into Table: Connect the 'Set' node to a second 'QuestDB' node (renamed 'QuestDB1' in the snippet). Configure this node:
- Operation:
insert(orexecuteQueryif you prefer to writeINSERT INTO test (id, name) VALUES ($id, $name);and map values). - Table:
test - Columns:
id, name - Credentials: Select your QuestDB credentials.
- Operation:
- Retrieve Data (Optional but recommended): Connect the 'Set' node to another 'QuestDB' node. Configure this node:
- Operation:
executeQuery - Query:
SELECT id, name FROM test; - Credentials: Select your QuestDB credentials. This step confirms the data insertion.
- Operation:
Apps Used
Workflow JSON
{
"id": "0c1fea44-40ee-444b-ab0f-66401c75ca19",
"name": "Automate QuestDB Table Creation and Data Insertion with n8n",
"nodes": 27,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 0c1fea44-40ee...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.