Cleaning up materialized views
You can delete materialized views, not used by your workload. You provide JDBC information about the queries associated with the materialized views using Workload Insights (wi) script and then use command-line JSON processor jq to delete the unused materialized views.
./wi -i “demo/queries/all/queryA.sql, demo/queries/all/queryB.sql” -u jdbc:hive2://localhost:10000 -n admin -p mypassword -dIn the following procedure, you delete unused materialized views. First, you get and store information about the unused materialized views in a record, next you use jq to read the record of deleted materialized views, and finally you drop the materialized views.