Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elementary in combination with sql server throws error #1547

Closed
bssulfikkar opened this issue Jun 5, 2024 · 1 comment
Closed

elementary in combination with sql server throws error #1547

bssulfikkar opened this issue Jun 5, 2024 · 1 comment
Labels
Bug Something isn't working Triage 👀

Comments

@bssulfikkar
Copy link

bssulfikkar commented Jun 5, 2024

Describe the bug
The dbt run command works fine until I installed elementary package. There is some bug in the elementary package as after installing elementary package I get error as Invalid column name 'True' . I tried using different versions of elementary package together with sql server odbc driver 17 but still getting the same issue.

To Reproduce
Steps to reproduce the behavior:

  1. Install dbt in windows using PowerShell with Python 3.8.0. Below python packages are installed.
    dbt-adapters==1.2.1
    dbt-common==1.1.0
    dbt-core==1.7.15
    dbt-extractor==0.5.1
    dbt-semantic-interfaces==0.4.4
    dbt-sqlserver==1.7.4

  2. install sql server in the local machine

  3. install elementary by keeping in the packages.yml

packages:

  • package: elementary-data/elementary
    version: 0.15.1

  • package: dbt-labs/dbt_utils
    version: 1.2.0

  • package: calogica/dbt_expectations
    version: 0.10.3

  • package: calogica/dbt_date
    version: 0.10.1

  1. execute dbt run

  2. See error
    dbt.txt

16:58:47 Unhandled error while executing target\run\elementary\models\edr\dbt_artifacts\dbt_invocations.sql
('42S22', "[42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'True'. (207) (SQLMoreResults); [42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Type boolean is not a defined system type. (243)")

16:58:49 Unhandled error while executing target\run\elementary\models\edr\dbt_artifacts\dbt_run_results.sql
('42S22', "[42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'True'. (207) (SQLMoreResults); [42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Type boolean is not a defined system type. (243)")

16:58:55 Unhandled error while executing target\run\elementary\models\edr\data_monitoring\schema_changes\schema_columns_snapshot.sql
('42S22', "[42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'True'. (207) (SQLMoreResults); [42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Type boolean is not a defined system type. (243)")

16:58:56 Unhandled error while executing target\run\elementary\models\edr\data_monitoring\anomaly_detection\metrics_anomaly_score.sql
('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]'stddev' is not a recognized built-in function name. (195) (SQLMoreResults); [42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '::'. (102)")

16:58:57 Unhandled error while executing target\run\elementary\models\edr\alerts\alerts_dbt_source_freshness.sql
('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near 'and'. (4145) (SQLMoreResults)")

16:58:57 Unhandled error while executing target\run\elementary\models\edr\alerts\alerts_anomaly_detection.sql
('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near 'and'. (4145) (SQLMoreResults)")

16:58:57 Unhandled error while executing target\run\elementary\models\edr\alerts\alerts_dbt_tests.sql
('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near 'and'. (4145) (SQLMoreResults)")

16:58:57 Unhandled error while executing target\run\elementary\models\edr\alerts\alerts_schema_changes.sql
('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near 'and'. (4145) (SQLMoreResults)")
Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Elementary CLI (edr) version: [e.g. 0.5.3], can be found by running pip show elementary-data : elementary-data 0.15.1
  • Elementary dbt package version: [e.g. 0.4.1], can be found in packages.yml file : elementary-data 0.15.1
  • dbt version you're using [e.g. 1.8.1] : dbt-core==1.7.15
  • Data warehouse [e.g. snowflake] : sql server
  • Infrastructure details (e.g. operating system, prod / dev / staging, deployment infra, CI system, etc) : windows, dev

Additional context
Add any other context about the problem here.

Would you be willing to contribute a fix for this issue? Not sure if I have time to fix it :)
Let us know if you're willing to contribute so that we'll be able to provide guidance.

@bssulfikkar bssulfikkar added Bug Something isn't working Triage 👀 labels Jun 5, 2024
@bssulfikkar bssulfikkar changed the title elementary together with sql server throws error Invalid column name 'True' elementary in combination with sql server throws error Invalid column name 'True' Jun 6, 2024
@bssulfikkar bssulfikkar changed the title elementary in combination with sql server throws error Invalid column name 'True' elementary in combination with sql server throws error Jun 6, 2024
@haritamar
Copy link
Collaborator

Hi @bssulfikkar !
Elementary does not currently support SQL server as an adapter. You can see the list of supported adapters here.

We have an open issue with the integration request, please feel free to upvote.
We're welcoming contributions community of this adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triage 👀
Projects
None yet
Development

No branches or pull requests

2 participants