EXT_METASTORE_SYNC fails when using REPLACE as an exist-action

In some circumstances, when invoking the EXT_METASTORE_SYNC stored procedure using the 'REPLACE' value for the exist-action parameter, the stored procedure call may fail with an error message.

Symptoms

The error message would look as follows:

ERROR DROP failed: The statement references an object that identifies an unexpected object type. Object: "LHDB2ICE.LH_ICE_SMOKE1". Object type: "DATALAKE TABLE". Expected object type: "TABLE"

Causes

When using EXT_METASTORE_SYNC procedures with the 'REPLACE' value for the exist-action parameter, there is a scenario that may fail. This issue will be fixed in a future release

Resolving the problem

To rectify, re-issue the call using the EXTERNAL_CATALOG_SYNC stored procedure name and the exact same parameters.