gnailJC opened a new issue, #2372:
URL: https://github.com/apache/incubator-paimon/issues/2372

   ### Search before asking
   
   - [X] I searched in the 
[issues](https://github.com/apache/incubator-paimon/issues) and found nothing 
similar.
   
   
   ### Paimon version
   
   
[paimon-spark-3.3-0.6-20231122.093342-69.jar](https://repository.apache.org/content/groups/snapshots/org/apache/paimon/paimon-spark-3.3/0.6-SNAPSHOT/paimon-spark-3.3-0.6-20231122.093342-69.jar)
   
   ### Compute Engine
   
   
https://www.apache.org/dyn/closer.lua/spark/spark-3.3.3/spark-3.3.3-bin-hadoop3.tgz
   
   ### Minimal reproduce step
   
   ```
   # 指定 Catalog
   spark.sql('use paimon;')
   spark.sql('CREATE DATABASE IF NOT EXISTS tdr;')
   spark.sql('use tdr;')
   
   df = spark.read \
       .format('mongodb') \
       .option('database', '') \
       .option('collection', '') \
       .option('connection.uri', '') \
       .load()
   
   full_data_writer = (df.write
                       .option('primary-key', '_id')  # 指定主键
                       .option('merge-engine', 'partial-update')  # 支持部分维度更新
                       .option('write.merge-schema', 'true')  # 自动 schema 
evolution
                       .option('write.merge-schema.explicit-cast', 'true')  # 
支持强制类型转换
                       .option('bucket', '-1')  # 动态 bucket
                       .option('tag.creation-period', 'daily')  # 快照生成-每天
                       .option('tag.num-retained-max', '30')  # 保留 30 天快照
                       .option('dynamic-bucket.assigner-parallelism', '32')  # 
初始 bucket 数量
                       .option('dynamic-bucket.target-row-num', '1000000')  # 单 
bucket 数据量
                       .option('write-buffer-size', '1200MB')
                       .option('target-file-size', '256MB')
                       .option('num-sorted-run.stop-trigger', '2147483647')
                       .option('sort-spill-threshold', '2')
                       .option('write-buffer-spillable', 'true')
                       )
   full_data_writer.saveAsTable(
       'ods_tbl', format='paimon', mode='append'
   )
   
   spark.sql('show create table ods_tbl').show()
   
   # the ddl TBLPROPERTIES don't has the options what we set.
   ```
   
   ### What doesn't meet your expectations?
   
   the options param like `primary-key` should be set into ods_tbl ddl 
TBLPROPERTIES
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


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

To unsubscribe, e-mail: [email protected]

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

Reply via email to