codope commented on issue #3242:
URL: https://github.com/apache/hudi/issues/3242#issuecomment-930129481


   > @moranyuwen can you solve this problem? I have this problem, but I can not 
solve it. I don't know how set mysql database instead derby, in Hudi config in 
spark code.
   
   @niloo-sh Ensure that the following configs are set properly in hive-site.xml
   ```
   "javax.jdo.option.ConnectionURL": 
"jdbc:mysql://hostname:3306/hive?createDatabaseIfNotExist=true",
   "javax.jdo.option.ConnectionDriverName": "org.mariadb.jdbc.Driver",
   "javax.jdo.option.ConnectionUserName": "username",
   "javax.jdo.option.ConnectionPassword": "password"
   ```
   
   Then, you need to specify the following Hudi configs to run hive sync:
   ```
   "hoodie.datasource.meta.sync.enable": "true",
   "hoodie.datasource.hive_sync.use_jdbc": "true",
   "hoodie.datasource.hive_sync.jdbcurl": 
"jdbc:mysql://hostname:3306/hive?createDatabaseIfNotExist=true",
   "hoodie.datasource.hive_sync.username": "username",
   "hoodie.datasource.hive_sync.password": "password",
   "hoodie.datasource.hive_sync.table": "my_hudi_table_name"
   ```


-- 
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]


Reply via email to