Rebuilding Netezza view sometimes becomes necessary when the view’s source table have changed underneath the view. Rebuilding a view can be done on Netezza or in Aginity. In Aginity, it is a simple process, assume your user has permissions to create or replace a view. The process breaks down into just a few steps:
Generate the create / replace view SQL of the original view into the query window, if you don’t have it already
In the object browser:
- Navigate to the Database and view you wish to rebuild
- Select the view and right click
- Select ‘Scripts’, then ‘DDL to Query window’
Make may updates to create / replace View SQL
- This step is not always necessary, sometimes the changes which invalided the view did not actually impact the code of the view. If changes are necessary, make may updates to the SQL code.
Execute The code
- This I usually do by choosing the ‘Execute as a single batch’ option. Make sure the code executes successfully.
Verify the view
- To verify the simply execute a select statement and make it executes without errors and/or warning.
- Aginity For Netezza – How to Generate DDL
- Netezza/PureData – Dictionary Views
- Netezza / PureData Table Documentation Practices
- [HY000] ERROR: Base table/view has changed (datatype); rebuild view
- Netezza / PureData – how to get the first row_number by group
- PureData / Netezza – Useful links
- Netezza – How GET to Database UTC Offset With SQL
- Netezza/PureData – Does a Table Truncate require a groom?
- Netezza / PureData – Two ways to get Numeric Day of Year
- Netezza / PureData – How to calculate months between two dates
- Netezza /PureData Date Difference in Days SQL
- Netezza / PureData – How to convert a timestamp to date in SQL
- PureData / Netezza – What date ranges are supported by Netezza?
- Netezza / PureData – How to Number for day of week in SQL?
- Aginity Workbench for PureData / Netezza System for Analytics – Useful links
- Netezza / PureData – What client tools to use with Netezza
- Aginity for Netezza – How to disable and/or Enable the Autocomplete Function
- PureData – Now() Command For Current Date
- PureData – Current Date Function