WZStephen opened a new issue #12103:
URL: https://github.com/apache/druid/issues/12103


   Hi,
   
   When I try to ingest the data from MySQL by submitting the JSON task down 
below to the server, I can always get a popout error from druid frontend UI 
said the 'SqlInputSource' error. The task and error messages are listed down 
below. I used 
https://github.com/apache/druid/blob/master/distribution/docker/Dockerfile.mysql
 to rebuild the druid docker image that suite with MySQL and I have checked the 
MySQL connector is correctly configured in both 
extensions/mysql-metadata-storage, and lib/. Can someone help me with this, 
please?
   ```
   {
     "type": "index_parallel",
     "spec": {
       "dataSchema": {
         "dataSource": "block_info_java_1",
         "parser": {
           "parserSpec": {
             "format": "timeAndDims",
             "dimensionsSpec": {
               "dimensions": [
                   ...........
               ]
             },
             "timestampSpec": {
               "column": "InsertTime",
               "format": "auto"
             }
           }
         },
         "granularitySpec": {
           "queryGranularity": "none",
           "rollup": false,
           "segmentGranularity": "week"
         }
       },
       "ioConfig": {
         "type": "index_parallel",
         "inputSource": {
           "type": "sql",
           "database": {
             "type": "mysql",
             "connectorConfig": {
               "connectURI": "jdbc:mysql://10.11.4.51:3306/bench",
               "user": "druid",
               "password": "123456"
             }
           },
           "sql":["SELECT * FROM block_info_java_1"]
         }
       },
       "tuningConfig": { 
         "type": "index_parallel"
       }
     }
   }
   ```
   
   ```
   Failed to submit task: Cannot construct instance of 
`org.apache.druid.metadata.input.SqlInputSource`, problem: 
`java.lang.NullPointerException` at [Source: 
(org.eclipse.jetty.server.HttpInputOverHTTP); line: 1, column: 2070] (through 
reference chain: 
org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexSupervisorTask["spec"]->org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexIngestionSpec["ioConfig"]->org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexIOConfig["inputSource"])
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to