ytsaurus / ytsaurus-spyt

YTsaurus SPYT provides an integration with Apache Spark
Apache License 2.0
12 stars 4 forks source link

Write spark StringType columns as Utf8 YTsaurus type #21

Open alextokarew opened 1 month ago

alextokarew commented 1 month ago

It is needed to support writing Spark dataframes with StringType columns to YTsaurus tables with Utf8 type columns. Two ways should be supported:

  1. df.write.option("string_to_utf8", "true").yt("//path/to/table") to convert all string columns to Utf8 type on writing;
  2. import yt.type_info as ti; df.write.schema_hint({"some_string_column": ti.Utf8}) to convert explicitly specified fields to utf8