Skip to main content
Solved

Guarding Views in data warehouse


daniel
TimeXtender Xpert
Forum|alt.badge.img+7
  • TimeXtender Xpert
  • 192 replies

Dear all,

Do any of you have a way of guarding Views in the data warehouse?

I have some views which I for archiving purposes rather not delete, but this is giving me issues when I want to deploy the project as a whole.

Thanks!

Best answer by daniel

Hi Andrew,

Thanks for the great sugestions. For me the best way would be not to change to many thing in the view, because that could possibly be a lot of rework later on when the view needs to be active again. 

A collegue at the client side has solved it like this (for now):
In the view he has left the ‘Create View [Schema].[TableName] AS’ and added in the line underneath: SELECT 1 AS hide
And then a multi line comment, commenting all everything. This is the least amount of work and it is in no way destructive. Until there is a guard possibility in TX I think I like this option.
 


 

View original
Did this topic help you find an answer to your question?

2 replies

andrew.gebhard
TimeXtender Xpert
Forum|alt.badge.img+2

Hi Daniel, 

As far as I know it is not possible to gaurd views on deployment. Seems like a good feature request!

You can remove all parameters of a view which means the view will no longer be reactive to other objects in the DWH and should no longer be marked as dirty. This way they will not be included in a differential deploy. For organisation, you could consider placing them in their own ‘archive’ schema (also handy for access rules). 

Alternatively, you can manually move the views to a new schema using SSMS, and then delete them in the TimeXtender UI. If you remove the object ID's from the extended properties of the view in SSMS, the view should also not be deleted using SQL Database Cleanup Tool. You can always use ‘script’ → ‘create view as’ in SSMS to retrieve the syntax stored in the view. 

Kind regards,

Andrew - E-mergo 


daniel
TimeXtender Xpert
Forum|alt.badge.img+7
  • Author
  • TimeXtender Xpert
  • 192 replies
  • Answer
  • March 22, 2023

Hi Andrew,

Thanks for the great sugestions. For me the best way would be not to change to many thing in the view, because that could possibly be a lot of rework later on when the view needs to be active again. 

A collegue at the client side has solved it like this (for now):
In the view he has left the ‘Create View [Schema].[TableName] AS’ and added in the line underneath: SELECT 1 AS hide
And then a multi line comment, commenting all everything. This is the least amount of work and it is in no way destructive. Until there is a guard possibility in TX I think I like this option.
 


 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings