public PipeParameterValidator validateRequiredAttribute(final String key)
      throws PipeAttributeNotProvidedException {
    if (!parameters.hasAttribute(key)) {
      throw new PipeAttributeNotProvidedException(key);
    }
    return this;
  }
Validates whether the attributes entered by the user contain an attribute whose key is
attributeKey.

@param key key of the attribute
@throws PipeAttributeNotProvidedException if the attribute is not provided
iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/customizer/parameter/PipeParameterValidator.java