Skip to content

[HELP WANTED] Implement a new adapter for MySQL #112

Description

@raphael-intugle

name: Help Wanted
about: Request community help on a specific task or feature
title: '[HELP WANTED] Implement a new adapter for MySQL'
labels: 'help wanted'
assignees: ''

What We Need Help With

We are looking for a contributor to build a new adapter for MySQL. This will enable users to connect Intugle directly to their MySQL databases for profiling, analysis, and building data products.

Background & Context

MySQL is one of the most popular open-source relational databases in the world. To broaden the applicability of Intugle, providing native support for MySQL is a crucial step. This will allow a large community of developers and data professionals to leverage Intugle with their existing data infrastructure.

Current State

Intugle does not currently have a native adapter for MySQL. Users must manually export their data into a file format like CSV to use it with our toolkit, which prevents direct, real-time analysis of the database.

Desired Outcome

A complete and well-tested MySQL adapter that allows users to:

  • Configure their MySQL connection in profiles.yml.
  • Profile tables and columns from a MySQL database.
  • Execute queries using the MySQL SQL dialect.
  • Create new tables or views from query results.
  • Seamlessly integrate their MySQL data into the Intugle semantic model.

Scope of Work

  • Create the directory and file scaffolding for the MySQL adapter in src/intugle/adapters/types/mysql/.
  • Define the Pydantic models for MySQL connection and data configuration (models.py).
  • Implement the MySQLAdapter class, inheriting from intugle.adapters.adapter.Adapter (mysql.py).
  • Implement all abstract methods from the Adapter base class for the MySQL dialect.
  • Register the new adapter in the adapter factory.
  • Add a suitable MySQL driver (e.g., mysql-connector-python) as an optional dependency in pyproject.toml.
  • Write unit tests to validate the adapter's functionality.

Technical Details

Checkout the documentation on how to implement a adapter : Implementing a Connector
The new adapter should follow the established pattern of the PostgresAdapter. The implementation will need to account for the differences in SQL dialect and connection handling between PostgreSQL and MySQL.

Relevant Files/Modules

  • src/intugle/adapters/types/postgres/ (as a reference)
  • src/intugle/adapters/types/mysql/ (to be created)
  • src/intugle/adapters/factory.py (to register the new adapter)
  • pyproject.toml (to add optional dependencies)
  • tests/adapters/ (to add new tests)

Key Concepts/Technologies

  • MySQL & its SQL dialect
  • Python
  • Pydantic

Related Documentation

Suggested Approach

Use the PostgresAdapter as a primary reference for the structure and logic. Pay close attention to areas where MySQL's SQL syntax, data types, and information schema differ from PostgreSQL's.

Skills Needed

  • Python development
  • Data engineering
  • SQL and database knowledge
  • Testing (pytest)
  • Documentation writing

Difficulty Level

  • Intermediate - Familiarity with data engineering concepts.

Time Estimate

  • Medium (a few days)

Getting Started

  1. Fork the repository.
  2. Set up your development environment (see CONTRIBUTING.md).
  3. Follow the Implementing a Connector guide.
  4. Use the PostgresAdapter as a template for your MySQLAdapter.

Testing Requirements

  • Unit tests for the new MySQLAdapter class.
  • Integration tests (if possible, with a local or containerized MySQL instance).
  • Documentation examples.

Questions & Support

  • Ask questions in the comments below.
  • Join our Discord for real-time help.

Additional Context

Note on Dependencies: When choosing a database driver or any other external library, please ensure its license is permissive (e.g., MIT, Apache 2.0) to be compatible with this project's Apache 2.0 license.


We appreciate your interest in contributing to Intugle! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions