datahub icon indicating copy to clipboard operation
datahub copied to clipboard

mssql - error with database that has table or column description

Open alcoccoque opened this issue 2 years ago • 1 comments

Describe the bug Problem with Microsoft SQL Server ingest source. During ingestion for database that has table or column description error occur.

To Reproduce Steps to reproduce the behavior:

  1. Create mssql yml configuration
    source:
      type: mssql
      config:
        # Coordinates
        host_port: localhost:1433
        database:  database

        # Credentials
        username: username
        password: password

        # Options
        use_odbc: "True"
        uri_args:
          driver: "ODBC Driver 17 for SQL Server"
          Encrypt: "yes"
          TrustServerCertificate: "Yes"
          ssl: "True"
    sink:
      type: "datahub-rest"
      config:
        server: "http://127.0.0.1:8080"
  1. Install latest version datahub mssql module pip install acryl-datahub[mssql]==0.8.40

  2. Add description to table or column in database

  3. Run command to ingest data datahub ingest -c ./<mssql yml name>.yml

  4. See error Table description error example ProgrammingError: (pyodbc.ProgrammingError) ('ODBC SQL type -150 is not yet supported. column-index=2 type=-150', 'HY106') (Background on this error at: http://sqlalche.me/e/13/f405) Column description error example ProgrammingError: (pyodbc.ProgrammingError) ('ODBC SQL type -150 is not yet supported. column-index=3 type=-150', 'HY106') (Background on this error at: http://sqlalche.me/e/13/f405)

Expected behavior Pipeline finished successfully

Screenshots Table description error image

Column description error image

Desktop (please complete the following information):

  • OS: [Windows, Ubuntu]
  • Browser [chrome]
  • Version [103.0.5]

DataHub libraries info:

  • DataHub CLI version [0.8.40]
  • Python version: [3.8.0]
  • SQLAlchemy [1.3.24]
  • pyodbc [4.0.32]
  • sqlalchemy-pytds [0.3.4]

Additional context Quick solution proposal:

  • add flag include_column_description
  • add flag include_table_description

alcoccoque avatar Jul 06 '22 13:07 alcoccoque

This issue is stale because it has been open for 15 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

github-actions[bot] avatar Aug 02 '22 02:08 github-actions[bot]

DataHub libraries info: DataHub CLI version [0.8.40] DataHub CLI version [0.8.41] DataHub CLI version [0.8.43]

Still not working on these versions

alcoccoque avatar Aug 29 '22 14:08 alcoccoque

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

github-actions[bot] avatar Sep 30 '22 02:09 github-actions[bot]

This is still an issue in DataHub Cli version [0.8.44]

LavinaVRovine avatar Oct 06 '22 11:10 LavinaVRovine

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

github-actions[bot] avatar Nov 07 '22 02:11 github-actions[bot]

This is still an issue in DataHub Cli version [0.8.44]

LavinaVRovine avatar Nov 11 '22 07:11 LavinaVRovine

Hi, @maggiehays I have a PR with a fix, however as a first-time contributor, I believe it needs a manual review, but nobody checked it out yet. Is there anything I can help or do to make it smoother? THanks

LavinaVRovine avatar Nov 11 '22 07:11 LavinaVRovine

Hey @LavinaVRovine can you link the PR here ? https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue

mayurinehate avatar Nov 16 '22 08:11 mayurinehate

Now that https://github.com/datahub-project/datahub/pull/6134 is merged, I'm closing this issue. Thanks @LavinaVRovine!

hsheth2 avatar Dec 06 '22 23:12 hsheth2