Update lookups-cached-global.md (#5525)

Update lookup creation example to work with version 0.12.0
This commit is contained in:
Alexander T 2018-04-07 01:13:17 +02:00 committed by Gian Merlino
parent ea4f8544fb
commit ad6f234e1e
1 changed files with 39 additions and 32 deletions

View File

@ -86,23 +86,26 @@ In a simple case where only one [tier](../../querying/lookups.html#dynamic-confi
{ {
"realtime_customer2": { "realtime_customer2": {
"country_code": { "country_code": {
"type": "cachedNamespace", "version": "v0",
"extractionNamespace": { "lookupExtractorFactory": {
"type": "jdbc", "type": "cachedNamespace",
"connectorConfig": { "extractionNamespace": {
"createTables": true, "type": "jdbc",
"connectURI": "jdbc:mysql:\/\/localhost:3306\/druid", "connectorConfig": {
"user": "druid", "createTables": true,
"password": "diurd" "connectURI": "jdbc:mysql:\/\/localhost:3306\/druid",
}, "user": "druid",
"table": "lookupValues", "password": "diurd"
"keyColumn": "value_id", },
"valueColumn": "value_text", "table": "lookupValues",
"filter": "value_type='country'", "keyColumn": "value_id",
"tsColumn": "timeColumn" "valueColumn": "value_text",
}, "filter": "value_type='country'",
"firstCacheTimeout": 120000, "tsColumn": "timeColumn"
"injective":true },
"firstCacheTimeout": 120000,
"injective": true
}
} }
} }
} }
@ -112,22 +115,26 @@ Where the coordinator endpoint `/druid/coordinator/v1/lookups/realtime_customer2
```json ```json
{ {
"type": "cachedNamespace", "version": "v0",
"extractionNamespace": { "lookupExtractorFactory": {
"type": "jdbc", "type": "cachedNamespace",
"connectorConfig": { "extractionNamespace": {
"createTables": true, "type": "jdbc",
"connectURI": "jdbc:mysql:\/\/localhost:3306\/druid", "connectorConfig": {
"user": "druid", "createTables": true,
"password": "diurd" "connectURI": "jdbc:mysql://localhost:3306/druid",
"user": "druid",
"password": "diurd"
},
"table": "lookupValues",
"keyColumn": "value_id",
"valueColumn": "value_text",
"filter": "value_type='country'",
"tsColumn": "timeColumn"
}, },
"table": "lookupTable", "firstCacheTimeout": 120000,
"keyColumn": "country_id", "injective": true
"valueColumn": "country_name", }
"tsColumn": "timeColumn"
},
"firstCacheTimeout": 120000,
"injective":true
} }
``` ```