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