I have profile and exclusion table in Snowflake and want to extract profile_id and profile_name as they are, while extracting transaction_count as 'null' as this column exists in exclusion table.
I want to do this dynamically for all columns in the profile table as columns names for profile table in exclusion table will change as per business requirement.
Example tables:
Profile:
| profile_id | profile_name | transaction_count |
|---|---|---|
| 1 | priya | 3 |
Exclusion:
| table_name | column_name |
|---|---|
| profile | transaction_count |
Is this possible to do in SQL? Or in a stored procedure?
