How do you perform schema and data validation using SQL queries in your automation scripts?
Write a SQL query that compares source_accounts and target_accounts and returns validation issues for both schema-level and row-level checks. Ignore rows where the compared key is NULL.
issue_type, table_name, record_id, and details.information_schema.columns and row-level differences between the two account tables.account_id from row comparison.issue_type, then table_name, then record_id.| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique account identifier |
| account_name | VARCHAR(100) | Account holder name |
| status | VARCHAR(20) | Account status |
| balance | NUMERIC(12,2) | Account balance |
| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique account identifier |
| account_name | VARCHAR(100) | Account holder name |
| status | VARCHAR(20) | Account status |
| balance | NUMERIC(12,2) | Account balance |