konradwudkowski opened a new issue #3063:
URL: https://github.com/apache/hudi/issues/3063


   **Describe the problem you faced**
   
   There is a new flag in hudi 0.7.0 or later - 
`hoodie.datasource.hive_sync.auto_create_database`. Based on documentation it 
defaults to `true` which would be consistent with previous behaviour that 
created hive dbs if they don't exist.
   
   It seems that `0.7.0` and `0.8.0` will actually default to `false` when 
writing a dataframe as hudi if the flag is not specified at all because of how 
this code is written here 
https://github.com/apache/hudi/blob/release-0.7.0/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala#L377
  so we end up with the following error instead 
`org.apache.hudi.hive.HoodieHiveSyncException: Failed to check if database 
exists your_db_name`
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   1. Write a dataframe to hudi without specyfing the new 
`hoodie.datasource.hive_sync.auto_create_database` flag
   2. it will not sync to hive and will give HoodieHiveSyncException exception 
instead
   
   **Expected behavior**
   
   On 0.6.0 this creates a hive db and in 0.7.0 it doesn't anymore. When the 
flag is explicitly provided and set to "true" it works fine so maybe docs could 
be updated to reflect it?
   
   **Environment Description**
   
   * Hudi version : 0.7.0 and 0.8.0
   
   **Additional context**
   Delta-streamer works fine with 0.7.0 
   
   


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

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


Reply via email to