Mateusz Kalinowski
08/18/2025, 1:45 PM{
"type": "cachedNamespace",
"extractionNamespace": {
"type": "jdbc",
"pollPeriod": "PT1H",
"connectorConfig": {
"connectURI": "jdbc:mysql://database:3306/table",
"user": {
"type": "environment",
"variable": "MYSQL_USERNAME"
},
"password": {
"type": "environment",
"variable": "MYSQL_PASSWORD"
}
},
"table": "Test",
"keyColumn": "id",
"valueColumn": "name"
}
}
But this gives me:
org.apache.druid.query.lookup.LookupUtils - Lookup [mk_test] could not be serialized properly. Please check its configuration. Error: Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)
2025-08-18 14:52:55.818
at [Source: (byte[])":)
This could mean that the configuration is incorrect. If I set the values directly, the lookup works as expected.
Will be grateful for any advice on this.Mateusz Kalinowski
08/18/2025, 1:59 PM{
"type": "cachedNamespace",
"extractionNamespace": {
"type": "jdbc",
"pollPeriod": "PT1H",
"connectorConfig": {
"connectURI": "jdbc:mysql://database:3306/table",
"user": "${MYSQL_USERNAME}",
"password": "${MYSQL_PASSWORD}"
},
"table": "Test",
"keyColumn": "id",
"valueColumn": "name"
}
}
Returns: UnableToObtainConnectionException: java.sql.SQLException: Access denied for user '${MYSQL_USERNAME}...'Kyle Hoondert
08/18/2025, 2:02 PMMateusz Kalinowski
08/18/2025, 2:05 PMMateusz Kalinowski
08/18/2025, 2:20 PMMateusz Kalinowski
08/18/2025, 4:42 PM{
"type": "cachedNamespace",
"extractionNamespace": {
"type": "jdbc",
"pollPeriod": "PT1H",
"connectorConfig": {
"connectURI": "jdbc:mysql://database:3306/table",
"user": "username",
"password": {
"type": "environment",
"variable": "MYSQL_PASSWORD"
}
},
"table": "Test",
"keyColumn": "id",
"valueColumn": "name"
}
}