datahub icon indicating copy to clipboard operation
datahub copied to clipboard

feat(ingestion): [WIP] Adding SSAS as a New Source for Data Ingestion

Open DmytroYurchuk opened this issue 1 year ago • 3 comments

[WIP] Adding SSAS as a New Source for Data Ingestion

Description:

This pull request introduces support for ingesting data from SSAS (SQL Server Analysis Services) into the DataHub platform. While the code is functional and currently being used within our organization, it's important to note that it lacks tests and some additional features due to time constraints and shifting priorities within our team.

Changes:

  • New Source Connector: Added a new connector specifically designed to interface with SSAS instances, enabling seamless ingestion of data from SSAS into DataHub.

  • Configuration Options: Included configuration options in the connector to specify SSAS server details, database name, cube name, and other relevant parameters necessary for establishing a connection.

Notes:

  • While this pull request is a work in progress and may not meet all quality standards, the code is functional and currently in use within our organization.

  • Due to time constraints and changing priorities, we haven't been able to complete the testing and add all planned features. However, we believe that this code may still be valuable to others in the community.

  • We encourage interested contributors to utilize this code as a starting point, and we welcome any improvements, additions, or feedback that the community may have.

Additional Notes:

  • Feedback and contributions are welcome to further enhance the SSAS connector and its integration with DataHub.

  • We hope that by open-sourcing this code, it may benefit others who are looking to integrate SSAS with their data workflows.

RFC Link: Link to RFC #4

Recipe Example:

source:
  type: ssas_multidimension
  config:
    username: user_name
    password: ***
    host_port: localhost:81
    server_alias: localhost
    virtual_directory_name: ssas
    instance: localhost
    use_https: false
    ssas_instance: ssas001
    ssas_instance_auth_type: HTTPBasicAuth
    dns_suffixes:
      - local.lan

Checklist

  • [ ] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • [ ] Links to related issues (if applicable)
  • [ ] Tests for the changes have been added/updated (if applicable)
  • [ ] Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • [ ] For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Summary by CodeRabbit

  • New Features

    • Introduced support for SQL Server Analysis Services (SSAS) integration, enhancing data ingestion capabilities.
    • Added new dependency group ssas with necessary libraries for SSAS functionality.
    • Implemented multiple classes for XMLA communication and metadata retrieval from both multidimensional and tabular SSAS models.
  • Bug Fixes

    • Improved error handling for XMLA server responses.
  • Documentation

    • Updated documentation to include new modules and classes for SSAS integration.
  • Chores

    • Added utility classes for DNS resolution and XMLA query handling.

DmytroYurchuk avatar Apr 15 '24 10:04 DmytroYurchuk

I see this is marked as WIP, so we haven't taken a look at it yet. @DmytroYurchuk is this ready for review? Is there anything we can do to help with this?

hsheth2 avatar Jun 12 '24 20:06 hsheth2

Walkthrough

The recent changes enhance the data ingestion capabilities for SQL Server Analysis Services (SSAS) by introducing new modules and updating existing ones. Key features include structured handling of XMLA responses, robust configurations for SSAS connections, and improved data models for multidimensional and tabular data. These modifications significantly streamline metadata retrieval and integration processes, fostering better interaction with SSAS environments.

Changes

File(s) Change Summary
setup.py Added new dependencies for SSAS integration and defined entry points for multidimensional and tabular data sources.
src/datahub/ingestion/source/ssas/api.py Introduced classes for handling XMLA communication with SSAS, establishing interfaces for SSAS API implementations.
src/datahub/ingestion/source/ssas/config.py Created configuration classes to manage SSAS connection parameters, enhancing connection management and validation.
src/datahub/ingestion/source/ssas/domains.py Defined data classes to model various SSAS components within the ingestion framework, facilitating structured data handling and representation.
src/datahub/ingestion/source/ssas/parser.py Introduced MdXmlaParser class for parsing XMLA data from multidimensional servers, enhancing data processing capabilities.
src/datahub/ingestion/source/ssas/ssas_core.py Implemented core classes for metadata ingestion from SSAS, managing metadata changes and work unit generation.
src/datahub/ingestion/source/ssas/ssas_multidimension/* Developed modules for multidimensional SSAS integration, including APIs and domain models for managing cube metadata.
src/datahub/ingestion/source/ssas/ssas_tabular/* Established modules for tabular SSAS integration, providing DAO layers and domain models for fetching and managing tabular data metadata.
src/datahub/ingestion/source/ssas/tools.py Added reusable tools for XMLA query handling and structured query definitions for tabular models.
src/datahub/ingestion/source/ssas/utils.py Introduced classes for DNS resolution, enhancing hostname management and connectivity with DNS suffix handling.
src/datahub/ingestion/source/ssas/xmla_server_response_error.py Created a custom exception class for handling XMLA server response errors, improving error management during SSAS interactions.
src/datahub/ingestion/source/ssas/xmlaclient.py Implemented an XMLA client to facilitate communication with SSAS servers, handling request construction and response parsing effectively.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SSASClient
    participant XmlaClient
    participant XmlaResponse
    participant Parser

    User->>SSASClient: Request metadata
    SSASClient->>XmlaClient: Send XMLA request
    XmlaClient->>XmlaResponse: Process response
    XmlaResponse->>Parser: Parse XMLA data
    Parser-->>SSASClient: Return structured data
    SSASClient-->>User: Provide metadata

🐇 In the fields, I hop with glee,
New features bloom, just wait and see!
With data streams and queries bright,
SSAS shines, oh what a sight!
From cubes and tables, we will play,
Ingestion magic, hip-hip-hooray! 🌼✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Aug 08 '24 18:08 coderabbitai[bot]