Skip to content

feat: implement MariaDB adapter#196

Merged
shiva-intugle merged 3 commits into
Intugle:mainfrom
trxvorr:feature/mariadb-adapter
Dec 18, 2025
Merged

feat: implement MariaDB adapter#196
shiva-intugle merged 3 commits into
Intugle:mainfrom
trxvorr:feature/mariadb-adapter

Conversation

@trxvorr

@trxvorr trxvorr commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Description

Implemented a new adapter for MariaDB to enable Intugle to connect, profile, and query MariaDB databases. This implementation uses the official mariadb Python connector (synchronous) as recommended, providing full compatibility with the MariaDB dialect and protocol.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 Code style update (formatting, renaming)
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvement
  • ✅ Test update
  • 🔧 Configuration change
  • 🏗️ Infrastructure/build change

Related Issue(s)

Fixes #113

Changes Made

  • Adapter Implementation: Created src/intugle/adapters/types/mariadb/ with MariaDBAdapter class implementing the Adapter interface.
  • Configuration Models: Defined MariaDBConnectionConfig and MariaDBConfig in models.py.
  • Registration: Registered the new adapter in src/intugle/adapters/factory.py and updated DataSetData type hint in src/intugle/adapters/models.py.
  • Dependencies: Added mariadb (version >= 1.1.10) to project.optional-dependencies in pyproject.toml.
  • Testing: Added comprehensive unit tests in tests/adapters/test_mariadb_adapter.py, including mocks for the database connection and an end-to-end integration test (skipped unless configured for live testing)

Testing

Test Configuration

  • Python Version: 3.13
  • OS: Windows
  • LLM Provider: N/A

Test Cases

  • Unit tests pass locally
  • Manual testing completed
  • Tested with sample datasets

Test Commands

# Run MariaDB adapter tests (uses mocks by default)
python -m pytest tests/adapters/test_mariadb_adapter.py

Screenshots/Examples

# usage in profiles.yml
mariadb:
  target: dev
  outputs:
    dev:
      type: mariadb
      host: localhost
      port: 3306
      user: root
      password: password
      database: my_database

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or linter errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have updated the relevant notebooks (if applicable)
  • I have checked my code and corrected any misspellings

Documentation Updates

  • README.md updated
  • Docstrings added/updated
  • Documentation site updated (if needed)
  • Notebook examples updated (if applicable)
  • CHANGELOG updated (if applicable)

Breaking Changes

  • This PR introduces breaking changes
  • Migration guide provided (if applicable)

Performance Impact

  • Performance benchmarks run
  • No significant performance impact
  • Performance improvement:
  • Performance regression:

Deployment Notes

Users will need to install the optional mariadb dependency to use this adapter:

pip install "intugle[mariadb]"

@shiva-intugle shiva-intugle merged commit 2157bc0 into Intugle:main Dec 18, 2025
1 check passed
@raphael-intugle

Copy link
Copy Markdown
Collaborator

Great work @trxvorr !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HELP WANTED] Implement a new adapter for MariaDB

3 participants