While fetching dependent views for a dataset, it is showing non-dependent views as well.
Affected Versions: 1.13
1.14
2.0
2.1
Fix Version: 2.1.1
2.2
Root cause(s)
For fetching depenent views we are using substring search on the sql statement used for the view creation. If the sql statement for a view contains a dataset name as a substring it will consider it as a dependent view for the dataset eventhough it is not derived from the dataset. Listing two scenarios where this issue might happen.
scenario1:
- Create datasets domain1.dataset1, domain1.dataset10, domain1.dataset1a.
- Create views view1, view2, view3 for these datasets respectively using following queries.
- Create view domain1.view1 as select * from domain1.dataset1,
- Create view domain1.view2 as select * from domain1.dataset10,
- Create view domain1.view3 as select * from domain1.dataset1a
- When try to fetch dependent views of domain1.dataset1, it will return all 3 views since it contains domain1.dataset1 as a substring in the sql statement.
scenario2:
- Create a datasets domain1.dataset1, testdomain1.dataset1, proddomain1.dataset1
- Create views view4, view5 for these datasets respectively using following queries.
- Create view testdomain1.view4 as select * from testdomain1.dataset1
- Create view proddomain1.view5 as select * from proddomain1.dataset10,
- When try to fetch dependent views of domain1.dataset1, it will return all view4 and view5 views since it contains domain1.dataset1 as a substring in the sql statement.
Impact
Users will be able to see non-dependent views for a dataset on dependent resource section.
Mitigation
Fix available
Fix is available in Amorphic version 2.2. Please upgrade to the latest version to resolve this issue.
Timeline
- 2023-03-28: Bug reported/identified (CLOUD-3317)
- 2023-04-04: Bug triaged
- 2023-04-07: Bug fixed
- 2023-04-13: Testing of fix is completed
- 2023-04-28: Amorphic version 2.1.1 Released with the bugfix