@Override
 public boolean isValidForDataViewer(Connection connection, IMetadataTable metadataTable) {
   if (!canHandle(connection)) {
     return false;
   }
   if (metadataTable == null) {
     return false;
   }
   String partition = metadataTable.getAdditionalProperties().get(HCatalogConstants.PARTITIONS);
   String partitionName = ExtractMetaDataFromHCatalog.extractPartitionNameByJsonStr(partition);
   if (StringUtils.isEmpty(partitionName)) {
     Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
     MessageDialog.openWarning(
         shell,
         Messages.getString("HCatalogDragAndDropHandler.dataViewer.warning.title"), // $NON-NLS-1$
         Messages.getString("HCatalogDragAndDropHandler.dataViewer.warning.msg")); // $NON-NLS-1$
     return false;
   }
   return true;
 }
 @Override
 public void handleTableRelevantParameters(
     Connection connection, IElement ele, IMetadataTable metadataTable) {
   if (ele == null || metadataTable == null) {
     return;
   }
   String tableName = metadataTable.getTableName();
   IElementParameter tableNameParameter =
       ele.getElementParameter(EHCatalogRepositoryToComponent.TABLE_NAME.getParameterName());
   if (tableNameParameter != null) {
     tableNameParameter.setValue(getRepositoryValueOfStringType(connection, tableName));
   }
   String partition = metadataTable.getAdditionalProperties().get(HCatalogConstants.PARTITIONS);
   if (StringUtils.isNotEmpty(partition)) {
     IElementParameter partitionParameter =
         ele.getElementParameter(EHCatalogRepositoryToComponent.PARTITION_NAME.getParameterName());
     if (partitionParameter != null) {
       String partitionName = ExtractMetaDataFromHCatalog.extractPartitionNameByJsonStr(partition);
       if (StringUtils.isNotEmpty(partitionName)) {
         partitionParameter.setValue(getRepositoryValueOfStringType(connection, partitionName));
       }
     }
   }
 }