@cdatasoftware/n8n-nodes-cdata-connect-ai
v1.0.0
Published
n8n node for CData AI API integration
Downloads
158
Readme
n8n-nodes-cdata-connect-ai
This is an n8n community node that allows you to integrate with CData Connect AI API in your n8n workflows.
Features
- Query Execution: Execute SQL queries against your connected data sources
- Metadata Retrieval: Get information about catalogs, schemas, tables, columns, and procedures
- Batch Operations: Execute multiple operations in a single request
- Stored Procedures: Execute stored procedures with parameters
- Workspace Support: Query specific workspaces
- Parameter Support: Use parameterized queries for security and flexibility
Installation
To install this node in your n8n instance:
Community Nodes (Recommended)
- Go to Settings > Community Nodes in your n8n instance
- Click "Install a community node"
- Enter
n8n-nodes-cdata-connect-ai - Click Install
Manual Installation
- Navigate to your n8n installation directory
- Run:
npm install n8n-nodes-cdata-connect-ai - Restart n8n
Configuration
Credentials Setup
- In n8n, create new credentials of type "CData Connect AI API"
- Fill in the required fields:
- Username: Your CData Connect AI email address
- Personal Access Token: Generate a PAT from your CData Connect AI Settings page
- Base URL:
https://cloud.cdata.com/api(default)
Node Configuration
Query Operations
- SQL Query: Enter your SQL statement
- Default Schema: Optional default schema
- Schema Only: Return only schema without data
- Workspace: Optional workspace name
- Parameters: Add query parameters with proper data types
Metadata Operations
- Get Catalogs: Retrieve available data source catalogs
- Get Schemas: Retrieve schemas for a catalog
- Get Tables: Retrieve tables for a schema
- Get Columns: Retrieve columns for a table
- Get Procedures: Retrieve stored procedures
Batch Operations
- Batch Operations: JSON array of operations to execute
Execute Operations
- Procedure Name: Name of the stored procedure
- Parameters: Procedure parameters with data types
Usage Examples
Basic Query
SELECT * FROM Salesforce1.Salesforce.Account LIMIT 10Parameterized Query
SELECT * FROM Salesforce1.Salesforce.Account WHERE Name = @accountNameWith parameter:
- Name:
@accountName - Data Type:
VARCHAR - Value:
Acme Corp
Batch Operations
[
{"query": "INSERT INTO MyTable (id, name) VALUES (1, 'Test')"},
{"query": "UPDATE MyTable SET name = 'Updated' WHERE id = 1"}
]API Reference
This node implements the CData Connect AI REST API endpoints:
POST /api/query- Execute SQL queriesGET /api/metadata/*- Retrieve metadataPOST /api/batch- Batch operationsPOST /api/exec- Execute stored procedures
For detailed API documentation, visit: https://docs.cloud.cdata.com/en/API/Query-Operation
Data Types
The node supports the following CData Connect AI data types:
| Value | Type | Description | |-------|------|-------------| | 5 | VARCHAR | String values | | 8 | INTEGER | Integer numbers | | 9 | BIGINT | Large integers | | 11 | DOUBLE | Floating point numbers | | 12 | DECIMAL | Decimal numbers | | 14 | BOOLEAN | True/false values | | 15 | DATE | Date values | | 17 | TIMESTAMP | Date and time values |
Error Handling
The node includes comprehensive error handling:
- API errors are caught and reported with detailed messages
- Invalid JSON in batch operations is validated
- Missing required parameters are validated
- Connection and authentication errors are handled gracefully
Support
For issues related to this n8n node:
- Create an issue on the GitHub repository
- Check the n8n community forum
For CData Connect AI API issues:
- Refer to the official CData documentation
- Contact CData support
License
MIT License - see LICENSE file for details
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Changelog
1.0.0
- Initial release
- Support for all major CData Connect AI API endpoints
- Complete parameter and workspace support
- Comprehensive error handling
- Full TypeScript implementation
