Skip to content

Add Denodo integration handler#10432

Merged
StpMax merged 10 commits into
mindsdb:releases/26.1.0from
ritwickrajmakhal:denodo-integration
Mar 13, 2026
Merged

Add Denodo integration handler#10432
StpMax merged 10 commits into
mindsdb:releases/26.1.0from
ritwickrajmakhal:denodo-integration

Conversation

@ritwickrajmakhal

@ritwickrajmakhal ritwickrajmakhal commented Jan 31, 2025

Copy link
Copy Markdown
Contributor

Description

This pull request introduces the integration of MindsDB with Denodo, a data virtualization platform. The changes include adding documentation, defining connection parameters, and implementing the Denodo handler to manage database interactions.

Fixes: #10057

Type of change

  • ⚡ New feature (non-breaking change which adds functionality)

Additional Media:

2025-01-31.23-49-56.mp4
  • I have attached a brief loom video or screenshots showcasing the new functionality or change.

Checklist:

  • My code follows the style guidelines(PEP 8) of MindsDB.
  • I have appropriately commented on my code, especially in complex areas.
  • Necessary documentation updates are either made or tracked in issues.
  • Relevant unit and integration tests are updated or added.

@ritwickrajmakhal

Copy link
Copy Markdown
Contributor Author

@quest-bot loot #10057

@quest-bot quest-bot Bot added the ⚔️ Quest Tracks quest-bot quests label Jan 31, 2025
@quest-bot quest-bot Bot mentioned this pull request Jan 31, 2025
1 task
@quest-bot

quest-bot Bot commented Jan 31, 2025

Copy link
Copy Markdown

Quest PR submitted! image Quest PR submitted!

@ritwickrajmakhal, you are attempting to solve the issue and loot this Quest. Will you be successful?


Questions? Check out the docs.

@ritwickrajmakhal ritwickrajmakhal changed the title Add Denodo integration handler and documentation Add Denodo integration handler Jan 31, 2025

@ZoranPandovski ZoranPandovski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. The only question I have is the usage of mysql dialect and mentioning denodo dialect. I've never used Denodo it looks like they have their own VQL?

@ritwickrajmakhal

Copy link
Copy Markdown
Contributor Author

Yes Denodo has their own VQL language, but also it suppports sql statements also.
image

@martyna-mindsdb

Copy link
Copy Markdown
Contributor

@ritwickrajmakhal
Please fix the Test on Push so @ZoranPandovski can review it. Thanks.

@ritwickrajmakhal

Copy link
Copy Markdown
Contributor Author

Done ✅

@ritwickrajmakhal ritwickrajmakhal changed the base branch from main to develop November 13, 2025 13:16
@StpMax StpMax changed the base branch from develop to releases/26.1.0 March 13, 2026 08:49
def get_columns(self, table_name: str) -> Response:
"""
Get columns for specified table using parameterized query.
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness: table_name is directly interpolated into the SQL string despite the docstring claiming it's parameterized — this allows SQL injection via a crafted table name.

🤖 AI Agent Prompt for Cursor/Windsurf

📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue

In mindsdb/integrations/handlers/denodo_handler/denodo_handler.py at line 148, the `get_columns` method builds a SQL string by directly interpolating `table_name` and `self.database` using an f-string. This allows SQL injection. Fix by using parameterized query execution (pass parameters separately to `cursor.execute`) instead of string interpolation.

logger.error(f"Error connecting to Denodo: {str(e)}")
raise ConnectionError(f"Failed to connect to Denodo: {str(e)}")

def disconnect(self) -> None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate Code: ⚠️ Duplicate Code Detected (Similarity: 90%)

This function disconnect duplicates existing code.

📍 Original Location:

mindsdb/integrations/handlers/postgres_handler/postgres_handler.py:211-218

Function: disconnect

💡 Recommendation:
Remove disconnect from DenodoHandler entirely by inheriting from PostgresHandler. If the psycopg2 vs psycopg3 driver difference requires a custom disconnect, keep a minimal override that only addresses the driver-specific teardown.

Consider importing and reusing the existing function instead of duplicating the logic.

- `user`: The username for the Denodo database.
- `password`: The password for the Denodo database.
- `host`: The hostname, IP address, or URL of the Denodo server.
- `port`: The port number for connecting to the Denodo server (default is `9999`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9999 or 9996 ?

password=self.connection_data.get("password"),
database=self.connection_data.get("database"),
)
return self.connection

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be good to set self.is_connected=True

@StpMax StpMax merged commit eef5ad3 into mindsdb:releases/26.1.0 Mar 13, 2026
10 of 12 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 13, 2026
@ritwickrajmakhal ritwickrajmakhal deleted the denodo-integration branch March 13, 2026 16:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚔️ Quest Tracks quest-bot quests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Integration]: DENODO INTEGRATION

9 participants