public static String convertToString(Object o) {
    if (o.getClass() == String.class) {
      return (String) o;
    } else if (o.getClass() == Duration.class) {
      Duration duration = (Duration) o;
      return String.format("%d ns", duration.toNanos());
    } else if (o instanceof List) {
      return ((List<?>) o)
          .stream()
              .map(e -> StructuredOptionsSplitter.escapeWithSingleQuote(convertToString(e), ";"))
              .collect(Collectors.joining(";"));
    } else if (o instanceof Map) {
      return ((Map<?, ?>) o)
          .entrySet().stream()
              .map(
                  e -> {
                    String escapedKey =
                        StructuredOptionsSplitter.escapeWithSingleQuote(e.getKey().toString(), ":");
                    String escapedValue =
                        StructuredOptionsSplitter.escapeWithSingleQuote(
                            e.getValue().toString(), ":");

                    return StructuredOptionsSplitter.escapeWithSingleQuote(
                        escapedKey + ":" + escapedValue, ",");
                  })
              .collect(Collectors.joining(","));
    }

    return o.toString();
  }
Convert System Env key to Configuration key For Example : AMS_DATABASE_PASSWORD --->
ams.database.password AMS_SERVER__EXPOSE__HOST ---> ams.server-expose-host
amoro-common/src/main/java/org/apache/amoro/config/ConfigHelpers.java