static SQLViewRepresentation fromJson(String json) {
    return JsonUtil.parse(json, SQLViewRepresentationParser::fromJson);
  }
@Test
  public void testParseSqlViewRepresentationMissingRequiredFields() {
    String missingDialect = "{\"type\":\"sql\", \"sql\": \"select * from foo\"}";
    assertThatThrownBy(() -> ViewRepresentationParser.fromJson(missingDialect))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing string: dialect");

    String missingType = "{\"sql\":\"select * from foo\",\"dialect\":\"spark-sql\"}";
    assertThatThrownBy(() -> ViewRepresentationParser.fromJson(missingType))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing string: type");
  }