Uninstalling Query Optimizer
Uninstall Query Optimizer in IBM®
watsonx.data by following the
instructions.
About this task
Procedure
- Run the following command to list all engines:
-- List engines oc get wxdengine -n ${PROJECT_CPD_INST_OPERANDS} -o custom-columns='Name:metadata.name,Display Name:spec.engineDisplayName'
- Run the following command to export the engine you want to uninstall Query
Optimizer from:
-- Select the engine to patch export ENGINE=<engine name>
- Run the following command to uninstall Query Optimizer from the
engine by patching it:
oc patch wxdengine $ENGINE -n ${PROJECT_CPD_INST_OPERANDS} --type json --patch '[ { "op": "remove", "path": "/spec/wxd_query_optimizer" }, { "op": "remove", "path": "/spec/enable_wxd_query_optimizer" }, { "op": "remove", "path": "/spec/pull_prefix" }, { "op": "remove", "path": "/spec/tag" }, { "op": "remove", "path": "/spec/img_ref" } ]'
Note: This patching will restart the engine automatically. - Run the following command to check the status of uninstallation of Query
Optimizer setup:
watch "oc get wxdengine -n ${PROJECT_CPD_INST_OPERANDS} -o custom-columns='Name:metadata.name,Display Name:spec.engineDisplayName,RECONCILE:status.engineStatus,STATUS:status.middleEndStatus'"
Note: Wait for the engine to finish reloading the Query Optimizer settings and show that the reconcile is “Completed”. - Run the following command to uninstall all Query Optimizer
resources that are no longer required from the operands namespace:
oc delete db2 lakehouse-oaas -n ${PROJECT_CPD_INST_OPERANDS} oc delete secret ibm-lh-lakehouse-oaas-secret -n ${PROJECT_CPD_INST_OPERANDS}
- Run the following command to uninstall
wxd_query_optimizer
operator:cpd-cli manage delete-olm-artifacts \ --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \ --components=wxd_query_optimizer