我能够构建像
{“类型”:“查找”,“尺寸”:“类型”,“outputName”: “TYPE_NAME”“outputType”:“STRING”,“retainMissingValue”:真实,“查询”:{“type”:“map”,“map”:{“0”:“未知”,…
这有效!您还可以添加一个时区,如果您的数据与我们的数据类似,那么这个时区非常重要。
{ "type": "extraction", "dimension": "__time", "outputName": "hourOfDay", "extractionFn": { "type": "cascade", "extractionFns": [ { "type": "timeFormat", "format": "H", "locale": "en" }, { "type": "lookup", "lookup": { "type": "map", "map": { "0": "early_morning", "1": "early_morning", "2": "early_morning", "3": "early_morning", "4": "early_morning", "5": "early_morning", "6": "morning", "7": "morning", "8": "morning", "9": "morning", "10": "morning", "11": "morning", "12": "afternoon", "13": "afternoon", "14": "afternoon", "15": "afternoon", "16": "afternoon", "17": "evening", "18": "evening", "19": "evening", "20": "evening", "21": "night", "22": "night", "23": "night" } }, "retainMissingValue": true, "injective": true } ] }