sachinkaleuipath opened a new issue #6463: Lookup: JdbcCacheGenerator fails if keyColumn is reserved keyword URL: https://github.com/apache/incubator-druid/issues/6463 Hi, I am using following config to create Lookup. ``` { "__default": { "job_state": { "version": "v0", "lookupExtractorFactory": { "type": "cachedNamespace", "extractionNamespace": { "type": "jdbc", "namespace": "queue_status_lookup", "connectorConfig": { "connectURI": "jdbc:sqlserver://myserver:1433;Database=mydb;Trusted_Connection=True", "user": "myuser", "password": "mypasswd" }, "table": "Queues", "keyColumn": "Key", "valueColumn": "Status", "tsColumn": "EndTime", "pollPeriod": 600000 }, "firstCacheTimeout": 120000, "injective": true } } } } ``` But getting following error in historical: `Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'Key'.` As **Key** is reserved keyword in SQL. I tried using **[Key]** which work while executing the query but as we are using the same while extracting the results, the code will look for **[Key]** in the result whereas result will contain only **Key**. So, we will get following error: `Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The column name [Key] is not valid.` I think, this will be solved if we take _keyColumnAlias_ and _valueColumnAlias_ in the input. I will be able to submit patch for the same. Just wanted to check that there is no solution to this problem (Generally, we avoid naming table fields with keywords but this is a third party table and don't have any control over it).
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org