Hi Umesh,

Could you share the exact error? Also have you tried using
com.uber.hoodie.NonpartitionedKeyGenerator.class as the key generator
class?

>> Is string allowed as time key column?
Sorry not fully following. Please clarify.

Thanks
Vinoth

On Tue, Apr 16, 2019 at 11:02 AM Umesh Kacha <umesh.ka...@gmail.com> wrote:

> Hi I am trying to bulk insert using the following code but I dont have
> partitioned directory so I just skipped that configuration. It throws some
> databricks Avro schema exception? Is string allowed as time key column?
> Please guide.
>
> df1.write
>       .format("com.uber.hoodie")
>       .option(DataSourceWriteOptions.STORAGE_TYPE_OPT_KEY,
> HoodieTableType.COPY_ON_WRITE.name
> <http://hoodietabletype.copy_on_write.name/>())
>       .option(DataSourceWriteOptions.OPERATION_OPT_KEY,
> DataSourceWriteOptions.BULK_INSERT_OPERATION_OPT_VAL) // insert
>       .option(DataSourceWriteOptions.RECORDKEY_FIELD_OPT_KEY,
> "customer_id")
>       .option(DataSourceWriteOptions.PRECOMBINE_FIELD_OPT_KEY,
> "review_date")
>       .option(HoodieWriteConfig.TABLE_NAME, "hoodie_test_table")
>       .mode(SaveMode.Overwrite)
>       .save("/tmp/hoodie/test_hoodie")
>

Reply via email to