79497218

Date: 2025-03-10 06:59:41
Score: 0.5
Natty:
Report link

'''


    json_map['key3'] as key3
    .......
    ..
    .....
    ......
    json_map['key100'] as key100

from(
        select json_map
        from input_table,lateral table(json_tuple(json_str)) as T(json_map)
    )

'''

I finally solved my problem through this method。this is json_tupe func

'''

public void eval(String jsonStr, String... keys) {
    HashMap<String, String> result = new HashMap<>(keys.length);
    if (jsonStr == null || jsonStr.isEmpty()) {
        collect(result);
        return;
    }
    try {
        JsonNode jsonNode = objectMapper.readTree(jsonStr);
        for (String key : keys) {
            JsonNode valueNode = jsonNode.get(key);

            if (valueNode != null) {
                result.put(key, valueNode.asText());
            }
        }
        collect(result);
    } catch (Exception e) {
        collect(result);
    }
}

'''

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: xinfa