Skip to content

Commit

Permalink
YtOutputWriter should expose WriteTable#config
Browse files Browse the repository at this point in the history
  • Loading branch information
faucct committed Feb 13, 2025
1 parent e07ec9a commit 8e2f92f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class YtOutputWriter(richPath: YPathEnriched,
val appendPath = richPath.withAttr("append", "true").toYPath
log.debugLazy(s"Initialize new write: $appendPath, transaction: $transactionGuid")
val request = WriteTable.builder[InternalRow]()
.setConfig(options.ytConf(WriteTableConfig))
.setPath(appendPath)
.setSerializationContext(new WriteSerializationContext(new InternalRowSerializer(schema, WriteSchemaConverter(options))))
.setTransactionalOptions(new TransactionalOptions(GUID.valueOf(transactionGuid)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ object YtTableSparkSettings {

case object SortColumns extends ConfigEntry[Seq[String]]("sort_columns", Some(Nil))

case object WriteTableConfig extends ConfigEntry[YTreeNode](s"write_table_config", Some(null))

case object UniqueKeys extends ConfigEntry[Boolean]("unique_keys", Some(false))

case object InconsistentDynamicWrite extends ConfigEntry[Boolean]("inconsistent_dynamic_write", Some(false))
Expand Down

0 comments on commit 8e2f92f

Please sign in to comment.