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

DVT tool taking only default schema 'dbo' for MSSQL for validation #363

Closed
LUJ20 opened this issue Jan 28, 2022 · 1 comment · Fixed by #365
Closed

DVT tool taking only default schema 'dbo' for MSSQL for validation #363

LUJ20 opened this issue Jan 28, 2022 · 1 comment · Fixed by #365
Assignees
Labels
priority: p0 Highest priority. Critical issue. Will be fixed prior to next release. Release Next release candidate type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@LUJ20
Copy link

LUJ20 commented Jan 28, 2022

DVT tool taking only default schema 'dbo' for MSSQL for validation

Example: I have a database named dvt,multiple shemas underneath like dbo,Sales,Person,...when I run validation it works only for dbo like below

python3 -m data_validation validate column -sc SQLServerSrc -tc SQLServerTgt -tbls dbo.ErrorLog

Error:pyodbc.ProgrammingError: ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot open database "dbo" requested by the login. The login failed. (4060) (SQLDriverConnect)')
**

python3 -m data_validation validate column -sc SQLServerSrc -tc SQLServerTgt -tbls dvt.ErrorLog

╒════╤═══════════════════╤═══════════════════╤═════════════════════╤══════════════════════╤════════════════════╤═════════════════════╤══════════════════════╤════════════════════╤════════════════════╤══════════════╤══════════════════╤══════════╕
│ │ validation_name │ validation_type │ source_table_name │ source_column_name │ source_agg_value │ target_table_name │ target_column_name │ target_agg_value │ group_by_columns │ difference │ pct_difference │ status │
╞════╪═══════════════════╪═══════════════════╪═════════════════════╪══════════════════════╪════════════════════╪═════════════════════╪══════════════════════╪════════════════════╪════════════════════╪══════════════╪══════════════════╪══════════╡
│ 0 │ count │ Column │ dvt.ErrorLog │ │ 0 │ dvt.ErrorLog │ │ 0 │ │ 0 │ nan │ success │
╘════╧═══════════════════╧═══════════════════╧═════════════════════╧══════════════════════╧════════════════════╧═════════════════════╧══════════════════════╧════════════════════╧════════════════════╧══════════════╧══════════════════╧══════════╛

It works only for default schema dbo but not for other schemas.Likewise I noticed a note stating for Postgres it takes 'Public' as default schema

MSSQL and POSTGRES should address all schema for validtaion

@nehanene15 nehanene15 added priority: p0 Highest priority. Critical issue. Will be fixed prior to next release. Release Next release candidate type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 28, 2022
@nehanene15 nehanene15 self-assigned this Feb 2, 2022
@dolonmukherji
Copy link

@LUJ20 how did you setup a connection for MSSQL?
I am using the below connection string
python -m data_validation connections add --connection-name PS_CONN MSSQL --host --port --user --password --database

I am getting the error below:
Connection Type "MSSQL" could not connect: (pyodbc.InterfaceError) ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p0 Highest priority. Critical issue. Will be fixed prior to next release. Release Next release candidate type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
3 participants