@clickzetta/cz-cli-darwin-x64 0.5.16 → 0.5.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/bin/cz-cli +0 -0
  2. package/bin/skills/lakehouse-doc-en/SKILL.md +6 -11
  3. package/bin/skills/lakehouse-doc-en/references/AIGateway.md +58 -13
  4. package/bin/skills/lakehouse-doc-en/references/Computation.md +1 -1
  5. package/bin/skills/lakehouse-doc-en/references/DataSource_Amazon_DocumentDB.md +3 -1
  6. package/bin/skills/lakehouse-doc-en/references/Foreach.md +14 -14
  7. package/bin/skills/lakehouse-doc-en/references/JDBC-Driver.md +0 -1
  8. package/bin/skills/lakehouse-doc-en/references/LakehouseAI-overview.md +21 -8
  9. package/bin/skills/lakehouse-doc-en/references/LakehouseDataGPT-tour.md +4 -9
  10. package/bin/skills/lakehouse-doc-en/references/LakehouseStudio-tour.md +14 -19
  11. package/bin/skills/lakehouse-doc-en/references/Lakehouse_Zilliz_MakeDataReadyforBIandAI.md +1 -1
  12. package/bin/skills/lakehouse-doc-en/references/Logstash.md +3 -3
  13. package/bin/skills/lakehouse-doc-en/references/Migrate_Spark_DataEngineeringBestPractices_Project_to_Lakehouse.md +1 -1
  14. package/bin/skills/lakehouse-doc-en/references/Notebook.md +17 -17
  15. package/bin/skills/lakehouse-doc-en/references/RemoteFunction-as-udf.md +14 -14
  16. package/bin/skills/lakehouse-doc-en/references/SQL_External_Catalog_Guide.md +1 -9
  17. package/bin/skills/lakehouse-doc-en/references/SUMMARY.md +59 -29
  18. package/bin/skills/lakehouse-doc-en/references/WINDOWFUNCTION.md +99 -57
  19. package/bin/skills/lakehouse-doc-en/references/Zettapark_Data_Engineering_Demo.md +1 -1
  20. package/bin/skills/lakehouse-doc-en/references/access-control-configuration.md +1 -8
  21. package/bin/skills/lakehouse-doc-en/references/aigw-2026-2-5-1.0.md +16 -0
  22. package/bin/skills/lakehouse-doc-en/references/aigw-2026-3-29-1.0.2.md +14 -0
  23. package/bin/skills/lakehouse-doc-en/references/aigw-2026-3-8-1.0.1.md +16 -0
  24. package/bin/skills/lakehouse-doc-en/references/aigw-2026-4-28-1.1.md +29 -0
  25. package/bin/skills/lakehouse-doc-en/references/aigw-2026-5-12-1.1.1.md +18 -0
  26. package/bin/skills/lakehouse-doc-en/references/aigw-2026-5-15-1.2.md +9 -0
  27. package/bin/skills/lakehouse-doc-en/references/aigw-2026-5-21-1.3.md +9 -0
  28. package/bin/skills/lakehouse-doc-en/references/aigw-2026-5-28-1.4.md +10 -0
  29. package/bin/skills/lakehouse-doc-en/references/aigw-2026-6-3-1.5.md +9 -0
  30. package/bin/skills/lakehouse-doc-en/references/alicloud-arn-externalid.md +0 -5
  31. package/bin/skills/lakehouse-doc-en/references/answer-accuracy-improve.md +120 -103
  32. package/bin/skills/lakehouse-doc-en/references/application-list.md +1 -3
  33. package/bin/skills/lakehouse-doc-en/references/approval-list.md +16 -17
  34. package/bin/skills/lakehouse-doc-en/references/batch-load-parquet-file-into-lakehouse.md +1 -1
  35. package/bin/skills/lakehouse-doc-en/references/batch_sync.md +9 -9
  36. package/bin/skills/lakehouse-doc-en/references/batch_sync_Sop.md +2 -2
  37. package/bin/skills/lakehouse-doc-en/references/batchloadparquetfileintoLakehouse.md +1 -1
  38. package/bin/skills/lakehouse-doc-en/references/bulkloadv1-python-sdk.md +3 -3
  39. package/bin/skills/lakehouse-doc-en/references/chart-auto-refresh-guide.md +12 -6
  40. package/bin/skills/lakehouse-doc-en/references/clickzetta-sample-data.md +3 -3
  41. package/bin/skills/lakehouse-doc-en/references/code_approval.md +1 -5
  42. package/bin/skills/lakehouse-doc-en/references/composite_task.md +31 -42
  43. package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_environment_and_data_generate.md +6 -9
  44. package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_javasdk_bulkload_realtime.md +4 -10
  45. package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_kafka_realtime_sync.md +1 -10
  46. package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_local_file_into_table_by_studio.md +0 -6
  47. package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_studio_batchload_public_network.md +0 -5
  48. package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_studio_python_node.md +2 -7
  49. package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_studio_realtime_cdc_public_network.md +13 -18
  50. package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_studio_sql_insert.md +0 -1
  51. package/bin/skills/lakehouse-doc-en/references/concepts.md +1 -1
  52. package/bin/skills/lakehouse-doc-en/references/config-datasource.md +5 -7
  53. package/bin/skills/lakehouse-doc-en/references/connect-with-cli.md +116 -72
  54. package/bin/skills/lakehouse-doc-en/references/connect-with-cz-cli.md +151 -0
  55. package/bin/skills/lakehouse-doc-en/references/continue-job.md +9 -17
  56. package/bin/skills/lakehouse-doc-en/references/create-api-connection.md +315 -286
  57. package/bin/skills/lakehouse-doc-en/references/create-catalog-connection.md +1 -0
  58. package/bin/skills/lakehouse-doc-en/references/create-dynamic-table.md +4 -4
  59. package/bin/skills/lakehouse-doc-en/references/create-external-catalog.md +85 -22
  60. package/bin/skills/lakehouse-doc-en/references/create-table-ddl.md +45 -0
  61. package/bin/skills/lakehouse-doc-en/references/creating_alicloud_privatelinkendpoint.md +4 -6
  62. package/bin/skills/lakehouse-doc-en/references/creating_alicloud_privatelinkservice.md +4 -7
  63. package/bin/skills/lakehouse-doc-en/references/creating_tencentcloud_privatelinkendpoint.md +2 -7
  64. package/bin/skills/lakehouse-doc-en/references/creating_tencentcloud_privatelinkservice.md +1 -5
  65. package/bin/skills/lakehouse-doc-en/references/cz-cli-agent.md +15 -10
  66. package/bin/skills/lakehouse-doc-en/references/cz-cli-datasource.md +0 -8
  67. package/bin/skills/lakehouse-doc-en/references/cz-cli-sql.md +2 -45
  68. package/bin/skills/lakehouse-doc-en/references/cz-cli.md +53 -42
  69. package/bin/skills/lakehouse-doc-en/references/dashboard-version-management-guide.md +12 -4
  70. package/bin/skills/lakehouse-doc-en/references/data-integration-intro.md +1 -1
  71. package/bin/skills/lakehouse-doc-en/references/data-integration.md +29 -27
  72. package/bin/skills/lakehouse-doc-en/references/data-load-summary.md +3 -3
  73. package/bin/skills/lakehouse-doc-en/references/data-quality.md +25 -25
  74. package/bin/skills/lakehouse-doc-en/references/data-sharing.md +31 -54
  75. package/bin/skills/lakehouse-doc-en/references/data-sources.md +45 -45
  76. package/bin/skills/lakehouse-doc-en/references/data_catalog.md +23 -25
  77. package/bin/skills/lakehouse-doc-en/references/data_privacy.md +5 -2
  78. package/bin/skills/lakehouse-doc-en/references/data_sharing_between_accounts_guide.md +0 -4
  79. package/bin/skills/lakehouse-doc-en/references/data_visualization.md +4 -15
  80. package/bin/skills/lakehouse-doc-en/references/dataagent.md +39 -7
  81. package/bin/skills/lakehouse-doc-en/references/databricks-delta-to-lakehouse-migration.md +168 -0
  82. package/bin/skills/lakehouse-doc-en/references/databricks-dlt-to-lakehouse-migration.md +331 -0
  83. package/bin/skills/lakehouse-doc-en/references/databricks-external-catalog-practice.md +367 -0
  84. package/bin/skills/lakehouse-doc-en/references/databricks-jobs-to-studio-migration.md +199 -0
  85. package/bin/skills/lakehouse-doc-en/references/databricks-notebook-to-studio-migration.md +350 -0
  86. package/bin/skills/lakehouse-doc-en/references/databricks-uc-governance-to-lakehouse-migration.md +327 -0
  87. package/bin/skills/lakehouse-doc-en/references/datagpt-model-config.md +34 -0
  88. package/bin/skills/lakehouse-doc-en/references/datagpt_data_source.md +50 -37
  89. package/bin/skills/lakehouse-doc-en/references/datagpt_introduction.md +55 -79
  90. package/bin/skills/lakehouse-doc-en/references/datagpt_quickstart.md +50 -64
  91. package/bin/skills/lakehouse-doc-en/references/datalake-acceleration.md +75 -2
  92. package/bin/skills/lakehouse-doc-en/references/dbt-databricks-to-clickzetta-migration.md +242 -0
  93. package/bin/skills/lakehouse-doc-en/references/dynamic-mask.md +30 -30
  94. package/bin/skills/lakehouse-doc-en/references/dynamic-table-bestpractice.md +1 -1
  95. package/bin/skills/lakehouse-doc-en/references/dynamic-table-introduce.md +1 -1
  96. package/bin/skills/lakehouse-doc-en/references/dynamic_table_summary.md +1 -1
  97. package/bin/skills/lakehouse-doc-en/references/eco_integration/streamlit.md +1 -1
  98. package/bin/skills/lakehouse-doc-en/references/eco_integration/superset.md +1 -1
  99. package/bin/skills/lakehouse-doc-en/references/ecosystem-all.md +1 -3
  100. package/bin/skills/lakehouse-doc-en/references/ecosystem.md +145 -0
  101. package/bin/skills/lakehouse-doc-en/references/external-catalog-summary.md +33 -38
  102. package/bin/skills/lakehouse-doc-en/references/external-function-combo-practice.md +466 -0
  103. package/bin/skills/lakehouse-doc-en/references/f6fc6447ee.md +7 -9
  104. package/bin/skills/lakehouse-doc-en/references/federation-query.md +56 -6
  105. package/bin/skills/lakehouse-doc-en/references/finebi-mysql.md +2 -0
  106. package/bin/skills/lakehouse-doc-en/references/get-started-with-sample-data.md +10 -11
  107. package/bin/skills/lakehouse-doc-en/references/gitfolder.md +2 -3
  108. package/bin/skills/lakehouse-doc-en/references/grant-privileges.md +2 -0
  109. package/bin/skills/lakehouse-doc-en/references/iceberg-rest-catalog-databricks.md +166 -0
  110. package/bin/skills/lakehouse-doc-en/references/ide.md +1 -1
  111. package/bin/skills/lakehouse-doc-en/references/if_else_task.md +59 -57
  112. package/bin/skills/lakehouse-doc-en/references/input_output.md +10 -7
  113. package/bin/skills/lakehouse-doc-en/references/jobprofile-bestpractices.md +60 -64
  114. package/bin/skills/lakehouse-doc-en/references/kafka-connection.md +0 -1
  115. package/bin/skills/lakehouse-doc-en/references/key-concepts.md +146 -117
  116. package/bin/skills/lakehouse-doc-en/references/lakehouse-ai-gateway-cz-cli.md +317 -0
  117. package/bin/skills/lakehouse-doc-en/references/lakehouse-ai-sql-analysis.md +345 -0
  118. package/bin/skills/lakehouse-doc-en/references/lakehouse-dqc-guide.md +300 -0
  119. package/bin/skills/lakehouse-doc-en/references/lakehouse-medallion-sql-dt-guide.md +543 -0
  120. package/bin/skills/lakehouse-doc-en/references/lakehouse-multi-cloud-acceleration.md +274 -0
  121. package/bin/skills/lakehouse-doc-en/references/lakehouse-multimodal-ai-pipeline.md +198 -0
  122. package/bin/skills/lakehouse-doc-en/references/lakehouse-quick-experience_guide.md +49 -52
  123. package/bin/skills/lakehouse-doc-en/references/lakehouse-volume-pipe-acceleration-guide.md +380 -0
  124. package/bin/skills/lakehouse-doc-en/references/langchain-plug-installation.md +1 -1
  125. package/bin/skills/lakehouse-doc-en/references/management.md +4 -9
  126. package/bin/skills/lakehouse-doc-en/references/medallion-lakehouse-from-scratch.md +2 -1
  127. package/bin/skills/lakehouse-doc-en/references/metrics_answer_build.md +58 -21
  128. package/bin/skills/lakehouse-doc-en/references/migrate-spark-data-engineering-best-practices-to-lakehouse.md +1 -1
  129. package/bin/skills/lakehouse-doc-en/references/mindsdb.md +1 -1
  130. package/bin/skills/lakehouse-doc-en/references/monitoring_and_alerting.md +65 -60
  131. package/bin/skills/lakehouse-doc-en/references/monitoring_item_specification.md +33 -33
  132. package/bin/skills/lakehouse-doc-en/references/multitable_batch_sync.md +16 -16
  133. package/bin/skills/lakehouse-doc-en/references/multitable_realtime_sync.md +65 -72
  134. package/bin/skills/lakehouse-doc-en/references/multitable_realtime_sync_sop.md +54 -52
  135. package/bin/skills/lakehouse-doc-en/references/navicat-mysql.md +2 -0
  136. package/bin/skills/lakehouse-doc-en/references/om-dynamic-table.md +71 -66
  137. package/bin/skills/lakehouse-doc-en/references/om-vcluster.md +2 -0
  138. package/bin/skills/lakehouse-doc-en/references/open-api-create-session.md +79 -0
  139. package/bin/skills/lakehouse-doc-en/references/open-api-generate-auth-token.md +63 -0
  140. package/bin/skills/lakehouse-doc-en/references/open-api-overview.md +96 -0
  141. package/bin/skills/lakehouse-doc-en/references/open-api-quick-start.md +286 -0
  142. package/bin/skills/lakehouse-doc-en/references/open-api-response-guide.md +264 -0
  143. package/bin/skills/lakehouse-doc-en/references/open-api-safe-question-poll.md +201 -0
  144. package/bin/skills/lakehouse-doc-en/references/open-api-text2insight-query.md +99 -0
  145. package/bin/skills/lakehouse-doc-en/references/open-api-text2insight-stop.md +74 -0
  146. package/bin/skills/lakehouse-doc-en/references/overview.md +6 -7
  147. package/bin/skills/lakehouse-doc-en/references/permission-application.md +5 -5
  148. package/bin/skills/lakehouse-doc-en/references/pipe-introduction.md +1 -0
  149. package/bin/skills/lakehouse-doc-en/references/pipe-kafka-table-stream.md +72 -70
  150. package/bin/skills/lakehouse-doc-en/references/pipe-kafka.md +105 -110
  151. package/bin/skills/lakehouse-doc-en/references/pipe-overview.md +40 -40
  152. package/bin/skills/lakehouse-doc-en/references/pipe-storage-object.md +43 -48
  153. package/bin/skills/lakehouse-doc-en/references/pipe-summary.md +14 -4
  154. package/bin/skills/lakehouse-doc-en/references/pipe-syntax.md +58 -151
  155. package/bin/skills/lakehouse-doc-en/references/practice_python_task.md +4 -4
  156. package/bin/skills/lakehouse-doc-en/references/pricing-ai-gateway.md +181 -0
  157. package/bin/skills/lakehouse-doc-en/references/pricing-lakehouse.md +316 -0
  158. package/bin/skills/lakehouse-doc-en/references/pricing.md +44 -288
  159. package/bin/skills/lakehouse-doc-en/references/private-link-general.md +0 -2
  160. package/bin/skills/lakehouse-doc-en/references/pyspark-to-zettapark-migration-f1.md +1 -1
  161. package/bin/skills/lakehouse-doc-en/references/python-igs.md +7 -3
  162. package/bin/skills/lakehouse-doc-en/references/python-sample-put-github-rt-events.md +1 -1
  163. package/bin/skills/lakehouse-doc-en/references/python-task.md +1 -1
  164. package/bin/skills/lakehouse-doc-en/references/python_reference/connector.md +3 -3
  165. package/bin/skills/lakehouse-doc-en/references/python_reference/connector_advanced.md +2 -2
  166. package/bin/skills/lakehouse-doc-en/references/python_reference/connector_examples.md +2 -2
  167. package/bin/skills/lakehouse-doc-en/references/python_sdk_guide.md +1 -1
  168. package/bin/skills/lakehouse-doc-en/references/python_shell_datasource.md +11 -9
  169. package/bin/skills/lakehouse-doc-en/references/quick_start_batch_sync_data.md +9 -18
  170. package/bin/skills/lakehouse-doc-en/references/quick_start_bi_analysis.md +8 -25
  171. package/bin/skills/lakehouse-doc-en/references/quick_start_create_workspace.md +4 -6
  172. package/bin/skills/lakehouse-doc-en/references/quick_start_data_quality.md +8 -8
  173. package/bin/skills/lakehouse-doc-en/references/quick_start_etl.md +16 -20
  174. package/bin/skills/lakehouse-doc-en/references/quick_start_monitoring_and_alerting.md +10 -18
  175. package/bin/skills/lakehouse-doc-en/references/quick_start_sql_query.md +7 -10
  176. package/bin/skills/lakehouse-doc-en/references/quick_start_upload_data.md +5 -7
  177. package/bin/skills/lakehouse-doc-en/references/quick_start_user_management.md +8 -8
  178. package/bin/skills/lakehouse-doc-en/references/quick_start_workspace.md +0 -5
  179. package/bin/skills/lakehouse-doc-en/references/quick_start_workspace_user.md +8 -8
  180. package/bin/skills/lakehouse-doc-en/references/quickstart.md +69 -56
  181. package/bin/skills/lakehouse-doc-en/references/quickstart_datashare_between_companies.md +0 -5
  182. package/bin/skills/lakehouse-doc-en/references/quickstart_envirment_for_team.md +0 -24
  183. package/bin/skills/lakehouse-doc-en/references/realtime-pipeline-selection-guide.md +1 -2
  184. package/bin/skills/lakehouse-doc-en/references/realtime-sales-dashboard-with-dynamic-table.md +3 -3
  185. package/bin/skills/lakehouse-doc-en/references/realtime_sync.md +0 -1
  186. package/bin/skills/lakehouse-doc-en/references/release-note-2026-05-19.md +5 -3
  187. package/bin/skills/lakehouse-doc-en/references/revoke-privileges.md +3 -1
  188. package/bin/skills/lakehouse-doc-en/references/roles.md +2 -3
  189. package/bin/skills/lakehouse-doc-en/references/row-filter.md +165 -0
  190. package/bin/skills/lakehouse-doc-en/references/row_level_permission.md +30 -19
  191. package/bin/skills/lakehouse-doc-en/references/scheduled_task.md +28 -21
  192. package/bin/skills/lakehouse-doc-en/references/security_overview.md +99 -21
  193. package/bin/skills/lakehouse-doc-en/references/set-command.md +1 -1
  194. package/bin/skills/lakehouse-doc-en/references/setup.md +13 -15
  195. package/bin/skills/lakehouse-doc-en/references/show-grants.md +1 -1
  196. package/bin/skills/lakehouse-doc-en/references/snowflake-dynamic-tables-to-lakehouse.md +2 -2
  197. package/bin/skills/lakehouse-doc-en/references/spark-connector-summary.md +1 -1
  198. package/bin/skills/lakehouse-doc-en/references/sql_functions/context_functions/current_vcluster.md +1 -1
  199. package/bin/skills/lakehouse-doc-en/references/sso-configuration.md +2 -2
  200. package/bin/skills/lakehouse-doc-en/references/streaming_pipeline_with_dynamic_table.md +0 -1
  201. package/bin/skills/lakehouse-doc-en/references/studio-incremental-sync-practice.md +27 -23
  202. package/bin/skills/lakehouse-doc-en/references/studio-shell-task.md +1 -1
  203. package/bin/skills/lakehouse-doc-en/references/supported-cloud-platforms.md +32 -0
  204. package/bin/skills/lakehouse-doc-en/references/table_rendering.md +18 -12
  205. package/bin/skills/lakehouse-doc-en/references/task-develop.md +89 -91
  206. package/bin/skills/lakehouse-doc-en/references/task_development.md +19 -17
  207. package/bin/skills/lakehouse-doc-en/references/task_group.md +16 -14
  208. package/bin/skills/lakehouse-doc-en/references/task_instance.md +21 -21
  209. package/bin/skills/lakehouse-doc-en/references/task_param.md +38 -35
  210. package/bin/skills/lakehouse-doc-en/references/task_param_reference.md +81 -79
  211. package/bin/skills/lakehouse-doc-en/references/task_scheduling_dependency.md +20 -21
  212. package/bin/skills/lakehouse-doc-en/references/tencentcloud_arn_and_externalid.md +1 -5
  213. package/bin/skills/lakehouse-doc-en/references/trial-account-quotas-and-limits.md +1 -3
  214. package/bin/skills/lakehouse-doc-en/references/tutorial_connect_to_lakehouse.md +69 -0
  215. package/bin/skills/lakehouse-doc-en/references/tutorials.md +4 -1
  216. package/bin/skills/lakehouse-doc-en/references/unique-key.md +167 -0
  217. package/bin/skills/lakehouse-doc-en/references/usageandbillingview.md +138 -0
  218. package/bin/skills/lakehouse-doc-en/references/use-dbt-dev.md +3 -3
  219. package/bin/skills/lakehouse-doc-en/references/use-java-sdk-realtime-uploaddata.md +1 -1
  220. package/bin/skills/lakehouse-doc-en/references/use-java-sdk-upload-data-local.md +3 -3
  221. package/bin/skills/lakehouse-doc-en/references/use-models.md +128 -0
  222. package/bin/skills/lakehouse-doc-en/references/use-mysql-client.md +81 -81
  223. package/bin/skills/lakehouse-doc-en/references/use-python-sdk-upload-data.md +10 -12
  224. package/bin/skills/lakehouse-doc-en/references/user-identification.md +2 -3
  225. package/bin/skills/lakehouse-doc-en/references/user_permission_grand_guide.md +1 -1
  226. package/bin/skills/lakehouse-doc-en/references/using-udf-in-dynamic-table.md +1 -1
  227. package/bin/skills/lakehouse-doc-en/references/vc_cache.md +18 -22
  228. package/bin/skills/lakehouse-doc-en/references/vcluster_size_description.md +33 -31
  229. package/bin/skills/lakehouse-doc-en/references/virtual-cluster.md +43 -45
  230. package/bin/skills/lakehouse-doc-en/references/web-job-history.md +94 -108
  231. package/bin/skills/lakehouse-doc-en/references/web_search.md +16 -7
  232. package/bin/skills/lakehouse-doc-en/references/zettapark-data-engineering-demo.md +1 -1
  233. package/bin/skills/lakehouse-doc-en/references/zettapark-dataframe-guide.md +144 -70
  234. package/bin/skills/lakehouse-doc-en/references/zettapark-dynamic-table-guide.md +2 -2
  235. package/bin/skills/lakehouse-doc-en/references/zettapark-etl-guide.md +73 -33
  236. package/bin/skills/lakehouse-doc-en/references/zettapark-feature-engineering.md +2 -2
  237. package/bin/skills/lakehouse-doc-en/references/zettapark-functions-guide.md +75 -46
  238. package/bin/skills/lakehouse-doc-en/references/zettapark-quick-start.md +2 -2
  239. package/bin/skills/lakehouse-doc-en/references/zettapark-stream-guide.md +4 -4
  240. package/bin/skills/lakehouse-doc-en/references/zettapark-volume-guide.md +93 -29
  241. package/package.json +1 -1
  242. package/bin/skills/lakehouse-doc-en/references/CLAUDE.md +0 -606
  243. package/bin/skills/lakehouse-doc-en/references/modelprice.md +0 -155
@@ -17,7 +17,6 @@ Singdata Lakehouse supports creating dependencies across workspaces. You can con
17
17
 
18
18
  ## Dependency Configuration Entry
19
19
 
20
- ![](.topwrite/assets/image_1756107294537.png)
21
20
  After entering a specific task, click "Scheduling" in the task toolbar to open the scheduling configuration dialog.
22
21
  Click "Scheduling Dependencies" to select dependent tasks and configure dependency strategies and other behaviors.
23
22
 
@@ -36,32 +35,32 @@ Note: Once the downstream task is mounted with dependencies, two conditions must
36
35
 
37
36
  ### Same Cycle Dependency
38
37
 
39
- | Scenario Classification | Task Description | Diagram |
40
- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
- | Daily Task B depends on Daily Task A | Task A: Generates 1 instance every day at 19:00 Task B: Generates 1 instance every day at 09:00 Upstream daily task does not set self-dependency By default, the periodic instance of the downstream daily task mounts dependency to the periodic instance of the upstream daily task in the same cycle. Upstream daily task sets self-dependency Upstream daily task sets self-dependency, and there is a cross-cycle dependency when the downstream daily task depends on the upstream daily task. | ![](.topwrite/assets/7b129dadfb/98452de2e2b79fa155a55371b7f489e1d5cd5cfd.jpeg) Note: Any type of self-dependency will create a dependency relationship with the previous cycle. If the previous cycle is not completed, it will prevent the next cycle's task from being scheduled. The diagram only demonstrates the daily cycle, subsequent types will not be repeatedly explained. |
42
- | Hourly Task B depends on Hourly Task A | Task A: 00:31-23:59 interval, generates an instance every 1 hour. A total of 24 instances, the first instance is at 00:31. Task B: 00:10-23:59 interval, generates an instance every 1 hour. A total of 24 instances, the first instance is at 00:10. | ![](.topwrite/assets/7b129dadfb/ab5444530545f6680a270889074a85738a159cef.jpeg) |
43
- | | Task A: 12:30-15:59 interval, generate an instance every 1 hour. A total of 4 instances, the first instance at 12:31. Task B: 15:10-18:59 interval, generate an instance every 1 hour. A total of 4 instances, the first instance at 15:10. | ![](.topwrite/assets/7b129dadfb/1c635dd17ece33adb3faa5ca7ee5a8ab09a05b26.jpeg) |
44
- | Minute Task B depends on Minute Task A | Task A: 00:00-01:59 interval, generate an instance every 5 minutes. A total of 12 instances, the first instance at 00:00. Task B: 00:10-00:59 interval, generate an instance every 5 minutes. A total of 10 instances, the first instance at 00:10. | ![](.topwrite/assets/7b129dadfb/8a0c5f6c04e1e9a55155bbc2724147788c169fcd.jpeg) |
45
- | | Task A: 00:22-00:59 interval, generate an instance every 5 minutes. A total of 8 instances, the first instance at 00:12. Task B: 00:36-00:59 interval, generate an instance every 5 minutes. A total of 5 instances, the first instance at 00:15. | ![](.topwrite/assets/7b129dadfb/03495a4d20f86aec92ca75c1c49b615dba8993f7.jpeg) |
38
+ | Scenario Classification | Task Description | Diagram |
39
+ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | Daily Task B depends on Daily Task A | Task A: Generates 1 instance every day at 19:00 Task B: Generates 1 instance every day at 09:00 Upstream daily task does not set self-dependency By default, the periodic instance of the downstream daily task mounts dependency to the periodic instance of the upstream daily task in the same cycle. Upstream daily task sets self-dependency Upstream daily task sets self-dependency, and there is a cross-cycle dependency when the downstream daily task depends on the upstream daily task. | ![](/.topwrite/assets/image_1780972223354.png =514) Note: Any type of self-dependency will create a dependency relationship with the previous cycle. If the previous cycle is not completed, it will prevent the next cycle's task from being scheduled. The diagram only demonstrates the daily cycle, subsequent types will not be repeatedly explained. |
41
+ | Hourly Task B depends on Hourly Task A | Task A: 00:31-23:59 interval, generates an instance every 1 hour. A total of 24 instances, the first instance is at 00:31. Task B: 00:10-23:59 interval, generates an instance every 1 hour. A total of 24 instances, the first instance is at 00:10. | ![](/.topwrite/assets/image_1780972417902.png) |
42
+ | | Task A: 12:30-15:59 interval, generate an instance every 1 hour. A total of 4 instances, the first instance at 12:31. Task B: 15:10-18:59 interval, generate an instance every 1 hour. A total of 4 instances, the first instance at 15:10. | ![](/.topwrite/assets/image_1780972441640.png) |
43
+ | Minute Task B depends on Minute Task A | Task A: 00:00-01:59 interval, generate an instance every 5 minutes. A total of 12 instances, the first instance at 00:00. Task B: 00:10-00:59 interval, generate an instance every 5 minutes. A total of 10 instances, the first instance at 00:10. | ![](/.topwrite/assets/image_1780972466642.png) |
44
+ | | Task A: 00:22-00:59 interval, generate an instance every 5 minutes. A total of 8 instances, the first instance at 00:12. Task B: 00:36-00:59 interval, generate an instance every 5 minutes. A total of 5 instances, the first instance at 00:15. | ![](/.topwrite/assets/image_1780972530598.png) |
46
45
 
47
46
  ### Large Cycle Depends on Small Cycle
48
47
 
49
- | Scenario | Dependency Description | Diagram |
50
- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51
- | Daily Task B depends on Hourly Task A | Task A: 00:31-23:59, generate an instance every 1 hour. A total of 24 instances, the first instance at 00:31. Task B: generate 1 instance daily at 19:00. | ![](.topwrite/assets/7b129dadfb/0668799023e06d16554eec11c4ba182153ce5f66.jpeg) |
52
- | Hourly Task B depends on Hourly Task A | Task A: 00:31-23:59, generate an instance every 1 hour. A total of 24 instances, the first instance at 00:31. Task B: 00:10-23:59, generate an instance every 2 hours. A total of 12 instances, the first instance at 00:10. | ![](.topwrite/assets/7b129dadfb/3d893243e925e6cfe57e9364facf592dd3ba2f07.jpeg) |
53
- | | Task A: Interval from 05:31 to 11:59, generate an instance every 3 hours. A total of 3 instances are generated, with the first instance at 05:31. Task B: Interval from 07:10 to 17:59, generate an instance every 5 hours. A total of 3 instances are generated, with the first instance at 07:10. | ![](.topwrite/assets/7b129dadfb/e310befdfa2f36d91bf0340f2c2c30172820f0f5.jpeg) |
54
- | Hourly Task B depends on Minute Task A | Task A: Interval from 00:08 to 01:59, generate an instance every 10 minutes. A total of 12 instances are generated, with the first instance at 00:08. Task B: Interval from 00:15 to 00:59, generate an instance every 1 hour. A total of 1 instance is generated, with the first instance at 00:15. | ![](.topwrite/assets/7b129dadfb/39973d157180d8aba3a98318be2e0da080614591.jpeg) |
55
- | Minute Task B depends on Minute Task A | Task A: Interval from 00:00 to 01:59, generate an instance every 10 minutes. A total of 12 instances are generated, with the first instance at 00:00. Task B: Interval from 00:38 to 01:59, generate an instance every 20 minutes. A total of 4 instances are generated, with the first instance at 00:38. | ![](.topwrite/assets/7b129dadfb/b291ee71ad481cd0756c1ed8bda99fa310d21639.jpeg) Note: If the minute granularity start and end range spans across hours, it will be automatically truncated. For example, the range of the second instance of Task B from left to right in the illustration is \[58, 60). |
48
+ | Scenario | Dependency Description | Diagram |
49
+ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
50
+ | Daily Task B depends on Hourly Task A | Task A: 00:31-23:59, generate an instance every 1 hour. A total of 24 instances, the first instance at 00:31. Task B: generate 1 instance daily at 19:00. | ![](/.topwrite/assets/image_1780972554009.png) |
51
+ | Hourly Task B depends on Hourly Task A | Task A: 00:31-23:59, generate an instance every 1 hour. A total of 24 instances, the first instance at 00:31. Task B: 00:10-23:59, generate an instance every 2 hours. A total of 12 instances, the first instance at 00:10. | ![](/.topwrite/assets/image_1780972579351.png) |
52
+ | | Task A: Interval from 05:31 to 11:59, generate an instance every 3 hours. A total of 3 instances are generated, with the first instance at 05:31. Task B: Interval from 07:10 to 17:59, generate an instance every 5 hours. A total of 3 instances are generated, with the first instance at 07:10. | ![](/.topwrite/assets/image_1780972621253.png) |
53
+ | Hourly Task B depends on Minute Task A | Task A: Interval from 00:08 to 01:59, generate an instance every 10 minutes. A total of 12 instances are generated, with the first instance at 00:08. Task B: Interval from 00:15 to 00:59, generate an instance every 1 hour. A total of 1 instance is generated, with the first instance at 00:15. | ![](/.topwrite/assets/image_1780972670099.png) |
54
+ | Minute Task B depends on Minute Task A | Task A: Interval from 00:00 to 01:59, generate an instance every 10 minutes. A total of 12 instances are generated, with the first instance at 00:00. Task B: Interval from 00:38 to 01:59, generate an instance every 20 minutes. A total of 4 instances are generated, with the first instance at 00:38. | ![](/.topwrite/assets/image_1780972694187.png)
 Note: If the minute granularity start and end range spans across hours, it will be automatically truncated. For example, the range of the second instance of Task B from left to right in the illustration is \[58, 60). |
56
55
 
57
56
  ### Small Cycle Depends on Large Cycle
58
57
 
59
- | Scenario | Dependency Description | Illustration |
60
- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
61
- | Hourly Task B depends on Daily Task A | Task A: Generate 1 instance every day at 19:00. Task B: Interval from 00:31 to 23:59, generate an instance every 1 hour. A total of 24 instances are generated, with the first instance at 00:31. | ![](.topwrite/assets/7b129dadfb/b0d5f070a0e56564e5abd3fed551c3fe5f59a98d.jpeg) |
62
- | Hourly Task B depends on Hourly Task A | Task A: Interval from 00:31 to 23:59, generate an instance every 2 hours. A total of 12 instances are generated, with the first instance at 00:31. Task B: Interval from 01:10 to 10:59, generate an instance every 1 hour. A total of 10 instances are generated, with the first instance at 01:10. | ![](.topwrite/assets/7b129dadfb/1f4ceabddf7f67a7857757b1df2cb2a87dc8445d.jpeg) |
63
- | Minute Task B depends on Hourly Task A | Task A: Interval from 00:15 to 00:59, generate an instance every 1 hour. A total of 1 instance is generated, with the first instance at 00:15. Task B: Interval from 00:08 to 01:59, generate an instance every 10 minutes. A total of 12 instances are generated, with the first instance at 00:08. | ![](.topwrite/assets/7b129dadfb/809a2068b534db2d520a5f2fd421136cfdc17f22.jpeg) |
64
- | Minute Task B Depends on Minute Task A | Task A: 00:38-01:59 interval, generates an instance every 20 minutes. A total of 4 instances are generated, with the first instance at 00:38. Task B: 00:00-01:59 interval, generates an instance every 10 minutes. A total of 12 instances are generated, with the first instance at 00:00. | ![](.topwrite/assets/7b129dadfb/02eb9c9b349e305232f514e8d917769c9403d98c.jpeg) |
58
+ | Scenario | Dependency Description | Illustration |
59
+ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
60
+ | Hourly Task B depends on Daily Task A | Task A: Generate 1 instance every day at 19:00. Task B: Interval from 00:31 to 23:59, generate an instance every 1 hour. A total of 24 instances are generated, with the first instance at 00:31. | ![](/.topwrite/assets/image_1780972788359.png) |
61
+ | Hourly Task B depends on Hourly Task A | Task A: Interval from 00:31 to 23:59, generate an instance every 2 hours. A total of 12 instances are generated, with the first instance at 00:31. Task B: Interval from 01:10 to 10:59, generate an instance every 1 hour. A total of 10 instances are generated, with the first instance at 01:10. | ![](/.topwrite/assets/image_1780972803587.png) |
62
+ | Minute Task B depends on Hourly Task A | Task A: Interval from 00:15 to 00:59, generate an instance every 1 hour. A total of 1 instance is generated, with the first instance at 00:15. Task B: Interval from 00:08 to 01:59, generate an instance every 10 minutes. A total of 12 instances are generated, with the first instance at 00:08. | ![](/.topwrite/assets/image_1780972820201.png) |
63
+ | Minute Task B Depends on Minute Task A | Task A: 00:38-01:59 interval, generates an instance every 20 minutes. A total of 4 instances are generated, with the first instance at 00:38. Task B: 00:00-01:59 interval, generates an instance every 10 minutes. A total of 12 instances are generated, with the first instance at 00:00. | ![](/.topwrite/assets/image_1780972838658.png) |
65
64
 
66
65
  ## Frequently Asked Questions
67
66
 
@@ -10,7 +10,6 @@ When configuring Private Link to access the Lakehouse network, to ensure that th
10
10
 
11
11
  You need to click "Create Role" on the Tencent Cloud Access Control page (<https://console.cloud.tencent.com/cam/role>) and select the role carrier as: Tencent Cloud Account:
12
12
 
13
- :-: ![](.topwrite/assets/image_1733066596983.png =383)
14
13
 
15
14
  Select "Other Main Account" for "Account Type";
16
15
 
@@ -18,12 +17,9 @@ Fill in the UID displayed on the Lakehouse page in the "Account ID";
18
17
 
19
18
  Check "Enable Verification" in the "External ID" option, and customize a string of characters for subsequent verification use.
20
19
 
21
- :-: ![](.topwrite/assets/image_1733066790847.png =813)
20
+
22
21
 
23
22
  In the "Configure Role Policy", find and check the "Private Network (VPC) Read-Only Access" policy (Lakehouse needs to call the DescribeVpcEndPoint and DescribeVpcEndPointService interfaces through this role);
24
23
 
25
- :-: ![](.topwrite/assets/image_1733067463964.png =753)
26
24
 
27
25
  Define the role name and click the "Complete" button to complete the role creation.
28
-
29
- :-: ![](.topwrite/assets/image_1733067522805.png =747)
@@ -76,9 +76,7 @@ If you occupy too many system resources through abnormal usage, Singdata Lakehou
76
76
 
77
77
  ***
78
78
 
79
- ## Contact Information
80
-
81
- ![](.topwrite/assets/20250708-181924.jpeg =611)
79
+ ^
82
80
 
83
81
  * **Email**: <<service@singdata.com>>
84
82
 
@@ -1 +1,70 @@
1
1
  # Tutorial: Connect to Lakehouse
2
+
3
+ Singdata Lakehouse supports multiple connection methods, from command-line tools to programming interfaces, meeting the access needs of different scenarios. Based on your role and technical preference, choose the most suitable connection method below.
4
+
5
+ ---
6
+
7
+ ## Connection Methods at a Glance
8
+
9
+ | Connection Method | Best For | Recommended Users |
10
+ |---------|---------|---------|
11
+ | **cz-cli Command-Line Tool** | Terminal SQL operations, task management, Agent integration | Data engineers, AI Agent developers |
12
+ | **JDBC Driver** | Java/Scala applications, direct BI tool connections | Application developers, BI engineers |
13
+ | **Command-Line Client (sqlline)** | Java-based interactive SQL terminal | Technical users familiar with traditional database terminals |
14
+ | **MySQL Protocol** | MySQL-compatible tools (Navicat, DataGrip, etc.) | Data analysts, DBAs |
15
+ | **SQLAlchemy** | Python data applications, Jupyter Notebooks | Python developers, data scientists |
16
+
17
+ ---
18
+
19
+ ## Choose by Role
20
+
21
+ ### Data Engineer / Terminal User
22
+
23
+ Recommended: **cz-cli** — configure a Profile once, and all subsequent SQL and task operations automatically use the same connection parameters, no need to enter a JDBC URL each time.
24
+
25
+ → [Connect with cz-cli Command-Line Tool](connect-with-cz-cli.md)
26
+
27
+ ### Java/Scala Application Developer
28
+
29
+ Recommended: **JDBC Driver** — standard database connection interface that integrates directly into frameworks like Spring and Flink.
30
+
31
+ → [JDBC Driver](JDBC-Driver.md)
32
+
33
+ ### Python Developer / Data Scientist
34
+
35
+ Recommended: **SQLAlchemy** — the standard database abstraction layer in the Python ecosystem, supporting both ORM and native SQL, suitable for Jupyter Notebook analysis scenarios.
36
+
37
+ → [Connect with SQLAlchemy](sqlalchemy.md)
38
+
39
+ ### BI Tool / Database Management Tool User
40
+
41
+ Lakehouse is compatible with the **MySQL protocol**. Tools like Navicat, DataGrip, and DBeaver can connect directly and operate Lakehouse just like MySQL.
42
+
43
+ → [Connect with MySQL Protocol](use-mysql-client.md)
44
+
45
+ ### Technical Users Familiar with Traditional Database Terminals
46
+
47
+ **sqlline** is a Java-based interactive SQL terminal. Enter SQL and get results back in real time — suitable for quick queries and data exploration.
48
+
49
+ → [Connect with Command-Line Client](connect-with-cli.md)
50
+
51
+ ---
52
+
53
+ ## Client Downloads
54
+
55
+ For download links for all client drivers and toolkits, see [Downloads](Lakehouse-client-repository.md).
56
+
57
+ ---
58
+
59
+ ## Common Connection Parameters
60
+
61
+ Regardless of which connection method you use, the following core information is required:
62
+
63
+ | Parameter | Description | How to Obtain |
64
+ |------|------|---------|
65
+ | **Service Endpoint** | Service endpoint address | See [Cloud Region Endpoints](connect-with-cz-cli.md#cloud-region-endpoints) |
66
+ | **Instance ID** | Instance identifier | Upper-left corner of the Studio homepage |
67
+ | **Workspace** | Workspace name | Top dropdown in Studio |
68
+ | **Schema** | Default Schema | Run `SHOW SCHEMAS` after connecting |
69
+ | **VCluster** | Virtual Cluster name | Run `SHOW VCLUSTERS` after connecting |
70
+ | **Username / Password** | Authentication credentials | Platform registered account |
@@ -28,7 +28,7 @@ Choose your onboarding path by role. Most scenarios can be completed in 30 minut
28
28
 
29
29
  **Step 3 — Build your data processing pipeline**
30
30
 
31
- [Dynamic Table Incremental Computation](incremental-computing.md) · [Studio Task Development and Scheduling](task-develop.md) · [End-to-End CDC Complete Example](czguide-intro-to-cdc-using-clickzetta-rtsync-dynamic-tables.md)
31
+ [Dynamic Table Incremental Computation](incremental-computing.md) · [Studio Task Development and Scheduling](task-develop.md) · [Data Engineering Agent](dataagent.md) (natural language ETL development, task management) · [End-to-End CDC Complete Example](czguide-intro-to-cdc-using-clickzetta-rtsync-dynamic-tables.md)
32
32
 
33
33
  **Step 4 — Connect external tools**
34
34
 
@@ -79,6 +79,7 @@ Choose your onboarding path by role. Most scenarios can be completed in 30 minut
79
79
  | Call LLMs in SQL | [AI Functions (AI\_COMPLETE / AI\_EMBEDDING)](ai_function_in_sql.md) |
80
80
  | Manage and switch between multiple LLM models | [AI Gateway](aigateway.md) |
81
81
  | Natural language conversational data analysis | [Data Analytics Agent](datagpt_introduction.md) |
82
+ | Natural language ETL development, task management, operations diagnostics | [Data Engineering Agent](dataagent.md) |
82
83
  | Python data processing + AI inference | [Zettapark Quick Start](zettapark-quick-start.md) |
83
84
 
84
85
  </td>
@@ -121,6 +122,7 @@ Choose your onboarding path by role. Most scenarios can be completed in 30 minut
121
122
  | Python data read/write | [Zettapark](zettapark-quick-start.md) · [clickzetta-connector](python_reference/connector.md) |
122
123
  | Business semantic layer queries | [Semantic View](semantic-view-overview.md) |
123
124
  | Collaborate with a specialized data sub-agent | [cz-cli agent run](setup_cz_cli.md) |
125
+ | Browser automation Web Agent | [Singclaw](https://www.singclaw.ai/) |
124
126
 
125
127
  </td>
126
128
  </tr>
@@ -159,6 +161,7 @@ Choose your onboarding path by role. Most scenarios can be completed in 30 minut
159
161
  | Experience engine performance (TPC-H) | [Experience Performance with TPC-H Sample Data](get-started-with-sample-data.md) |
160
162
  | Write complex business analytics SQL | [SQL Usage Guide](considerations-for-using-sql.md) |
161
163
  | Use AI to analyze data conversationally | [Data Analytics Agent (DataGPT)](lakehousedatagpt-tour.md) |
164
+ | Use AI for ETL development / task management | [Data Engineering Agent](dataagent.md) |
162
165
  | Build vector search / RAG knowledge base | [Vector Search](vector_search_ai.md) |
163
166
  | Process data with Python (Zettapark) | [Zettapark Quick Start](zettapark-quick-start.md) |
164
167
  | Migrate from Spark to Lakehouse | [Migration Guide](tutorial_migration.md) |
@@ -0,0 +1,167 @@
1
+ # Unique Key (UNIQUE) in Lakehouse
2
+
3
+ ## Overview
4
+
5
+ > **Important difference from traditional databases**
6
+ >
7
+ > The UNIQUE constraint in Singdata Lakehouse is an **informational constraint (declarative constraint)**, and its behavior differs fundamentally from traditional databases such as MySQL and PostgreSQL:
8
+ >
9
+ > - **Uniqueness is not enforced by default**: In the default mode (`DISABLE NOVALIDATE RELY`), the system does not validate uniqueness during SQL writes — duplicate values can be written normally.
10
+ > - **Primary purpose is query optimization**: The UNIQUE constraint is mainly used to declare the data semantics of a column (or set of columns) to the query optimizer, helping it produce better execution plans for deduplication elimination, row count estimation, and join optimization.
11
+ > - **Application layer must enforce uniqueness**: If strict uniqueness is required by the business, it must be guaranteed by the data writer — you cannot rely on the UNIQUE constraint to enforce it.
12
+
13
+ The `UNIQUE` constraint declares that the values in one column or a combination of columns in a table are unique. Unlike a primary key (`PRIMARY KEY`), a UNIQUE constraint:
14
+
15
+ - Allows NULL values in columns (primary key columns enforce NOT NULL);
16
+ - Allows multiple UNIQUE constraints on a single table (only one primary key is allowed);
17
+ - Is not used as the operation key for real-time writes (CDC UPSERT/DELETE).
18
+
19
+ A UNIQUE constraint can only be specified at table creation (`CREATE TABLE`). **Adding it via `ALTER TABLE` is not supported.**
20
+
21
+ ## Syntax
22
+
23
+ The UNIQUE constraint supports both column-level and table-level syntax, and both forms can include constraint modifiers.
24
+
25
+ ### Column-level syntax
26
+
27
+ ```sql
28
+ CREATE TABLE t (
29
+ id int UNIQUE,
30
+ name string
31
+ );
32
+ ```
33
+
34
+ ### Table-level syntax
35
+
36
+ Table-level syntax supports single-column and multi-column composite unique keys:
37
+
38
+ ```sql
39
+ -- Single column
40
+ CREATE TABLE t (
41
+ id int,
42
+ name string,
43
+ UNIQUE(id)
44
+ );
45
+
46
+ -- Composite unique key
47
+ CREATE TABLE t (
48
+ a int,
49
+ b int,
50
+ UNIQUE(a, b)
51
+ );
52
+ ```
53
+
54
+ ### Constraint modifiers
55
+
56
+ The UNIQUE constraint supports three groups of modifiers in a fixed order (consistent with PRIMARY KEY and FOREIGN KEY):
57
+
58
+ ```
59
+ UNIQUE [ENABLE | DISABLE] [VALIDATE | NOVALIDATE] [RELY | NORELY]
60
+ ```
61
+
62
+ | Modifier | Meaning | Default |
63
+ |----------|---------|---------|
64
+ | `ENABLE` / `DISABLE` | Whether to enforce validation on subsequent writes | `DISABLE` |
65
+ | `VALIDATE` / `NOVALIDATE` | Whether existing data is required to satisfy the constraint | `NOVALIDATE` |
66
+ | `RELY` / `NORELY` | Whether the optimizer trusts and uses this constraint for query optimization | `RELY` |
67
+
68
+ When no modifiers are specified, the default behavior of a UNIQUE constraint is **`DISABLE NOVALIDATE RELY`**.
69
+
70
+ ## Default behavior: declarative constraint (no deduplication)
71
+
72
+ In the default `DISABLE NOVALIDATE RELY` mode, the UNIQUE constraint is recorded only as metadata and **does not prevent duplicate values from being written**:
73
+
74
+ ```sql
75
+ CREATE TABLE uk_demo (id int UNIQUE, name string);
76
+
77
+ -- View the constraint
78
+ DESC EXTENDED uk_demo;
79
+ -- unique_keys: ((id) DISABLE NOVALIDATE RELY)
80
+
81
+ -- Duplicate id values can both be written
82
+ INSERT INTO uk_demo VALUES(1, 'a');
83
+ INSERT INTO uk_demo VALUES(1, 'b');
84
+
85
+ SELECT * FROM uk_demo;
86
+ -- 1 | a
87
+ -- 1 | b (duplicate value was not blocked)
88
+
89
+ -- Multiple NULLs are allowed
90
+ INSERT INTO uk_demo VALUES(NULL, 'c');
91
+ INSERT INTO uk_demo VALUES(NULL, 'd');
92
+ -- Both writes succeed
93
+ ```
94
+
95
+ ## RELY and the optimizer
96
+
97
+ `RELY` (the default) tells the optimizer it can trust the constraint and optimize queries based on it, even if the constraint is not enforced during writes. The optimizer uses RELY unique keys for:
98
+
99
+ - Deduplication elimination (simplification of DISTINCT / GROUP BY);
100
+ - Row count and NDV (number of distinct values) estimation;
101
+ - Join cardinality estimation and plan selection.
102
+
103
+ If the data does not actually satisfy uniqueness but the constraint is declared as RELY, the optimizer may produce incorrect results. In this case, use `NORELY` to tell the optimizer to ignore the constraint:
104
+
105
+ ```sql
106
+ CREATE TABLE uk_demo (id int UNIQUE NORELY, name string);
107
+ -- unique_keys: ((id) DISABLE NOVALIDATE NORELY)
108
+ ```
109
+
110
+ ## Actual behavior of modifier combinations
111
+
112
+ The following table shows observed behavior for each modifier combination:
113
+
114
+ | Declaration | DESC EXTENDED shows | Write behavior |
115
+ |-------------|---------------------|----------------|
116
+ | `UNIQUE` (default) | `DISABLE NOVALIDATE RELY` | Duplicates allowed, multiple NULLs allowed |
117
+ | `UNIQUE ENABLE` | `ENABLE NOVALIDATE RELY` | Duplicates allowed (no VALIDATE means no check) |
118
+ | `UNIQUE NORELY` | `DISABLE NOVALIDATE NORELY` | Duplicates allowed; optimizer ignores constraint |
119
+ | Multiple `UNIQUE` | Each is `DISABLE NOVALIDATE RELY` | Allowed |
120
+
121
+ > ⚠️ **Enforced uniqueness (`ENABLE VALIDATE`) is currently not usable**
122
+ >
123
+ > When `UNIQUE ... ENABLE VALIDATE` is declared, table creation succeeds (DESC shows `ENABLE VALIDATE RELY` and HASH bucketing with sort keys is auto-generated), but executing `INSERT` on the table produces a compiler error:
124
+ >
125
+ > ```
126
+ > CZLH-65000: ... Table should have primary keys/unique keys
127
+ > ```
128
+ >
129
+ > This limitation is unrelated to whether the column is declared NOT NULL. **If you need to enforce deduplication at write time, use a primary key (PRIMARY KEY) rather than a UNIQUE constraint.** See [Primary Key](primary-key.md) for details.
130
+
131
+ ## Relationship with PRIMARY KEY
132
+
133
+ - A table's primary key is also recorded as a unique key, so `DESC EXTENDED`'s `unique_keys` field will include the primary key columns.
134
+ - A table can define both a primary key and multiple (non-enforced) UNIQUE constraints.
135
+ - A table **can have at most one enforced constraint**. If the primary key is already enforced (which is the default), declaring `UNIQUE ... ENABLE VALIDATE` will produce an error at table creation:
136
+
137
+ ```sql
138
+ CREATE TABLE t (id int PRIMARY KEY, code int UNIQUE ENABLE VALIDATE);
139
+ -- CZLH-42000: cannot enforce UNIQUE constraint with an enforced PRIMARY KEY
140
+ ```
141
+
142
+ | Comparison | PRIMARY KEY | UNIQUE |
143
+ |------------|-------------|--------|
144
+ | Count per table | At most 1 | Multiple allowed |
145
+ | Column nullability | Enforces NOT NULL | Allows NULL (multiple NULLs allowed) |
146
+ | Real-time write (CDC) dedup key | Yes | No |
147
+ | Default modifiers | `ENABLE VALIDATE RELY` | `DISABLE NOVALIDATE RELY` |
148
+ | Primary purpose | CDC dedup + query optimization | Query optimization (declarative) |
149
+
150
+ ## Validation rules at table creation
151
+
152
+ The system performs the following checks on UNIQUE constraints when creating a table:
153
+
154
+ - **No duplicate column names within a single constraint**: `UNIQUE(a, a)` produces an error.
155
+ - **No redundant constraints**: If a UNIQUE constraint is identical to the primary key, or is a superset of another unique key (or the primary key), an `unnecessary unique key` error is reported.
156
+ - **At most one enforced constraint**: Multiple `ENABLE VALIDATE` constraints (including the primary key) produce an error.
157
+
158
+ ## Usage recommendations
159
+
160
+ - Treat UNIQUE as a **hint to the optimizer**: If you know that a column is unique in practice (for example, a business primary key synced from an upstream system), declaring UNIQUE can help the optimizer generate better plans.
161
+ - If the declared column may actually contain duplicates, use `NORELY` to prevent the optimizer from making incorrect simplifications based on the constraint.
162
+ - When you need to **truly enforce deduplication at write time**, use a primary key (PRIMARY KEY) together with a real-time write interface — not a UNIQUE constraint.
163
+
164
+ ## References
165
+
166
+ - [Primary Key](primary-key.md)
167
+ - [CREATE TABLE Syntax](create-table-ddl.md)
@@ -0,0 +1,138 @@
1
+ # Usage and Billing View
2
+
3
+ `sys.information_schema.instance_usage` is a system view in Singdata Lakehouse that records resource consumption and billing details at the instance level. Each row represents the consumption of one SKU during a single billing period (hourly or daily), making it the primary source for bill reconciliation, cost attribution, and usage trend analysis.
4
+
5
+ Data is retained from instance creation onward.
6
+
7
+ ***
8
+
9
+ ## Field Reference
10
+
11
+ | Field | Type | Description |
12
+ | -------------------------- | --------- | ------------------------------------------------------------------------------- |
13
+ | `account_id` | int | Account ID |
14
+ | `account_name` | string | Account name (i.e. the instance name) |
15
+ | `instance_id` | int | Instance ID |
16
+ | `region_name` | string | Cloud region, e.g. `Alibaba Cloud - East China 2 (Shanghai)` |
17
+ | `sku_category` | string | SKU category — see classification table below |
18
+ | `sku_name` | string | Specific SKU name |
19
+ | `workspace_id` | string | Workspace ID |
20
+ | `workspace_name` | string | Workspace name |
21
+ | `measurement_start` | timestamp | Start of the billing period |
22
+ | `measurement_end` | timestamp | End of the billing period |
23
+ | `measurements_unit` | string | Unit of measurement, e.g. `yuan/cru`, `yuan/GiB/day`, `yuan/gb`, `M Tokens` |
24
+ | `measurements_consumption` | double | Actual consumption during the period (in the given unit) |
25
+ | `price_rate` | string | Unit price as a string, e.g. `"0.020000"` |
26
+ | `amount` | double | Gross amount before discount (consumption × unit price) |
27
+ | `discount_rate` | double | Discount rate: `1` means no discount, `0.8` means 20% off |
28
+ | `total_after_discount` | double | Net amount after discount (the actual billed amount) |
29
+
30
+ ***
31
+
32
+ ## SKU Categories
33
+
34
+ | `sku_category` | `sku_name` examples | Description |
35
+ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- |
36
+ | `compute` | GP Virtual Cluster, AP Virtual Cluster, Integration Virtual Cluster, Bulk Ingestion, Stream Ingestion, IGS Service, Task Scheduling | Compute resource consumption, unit: `yuan/cru` |
37
+ | `storage` | Managed Storage, Retained Managed Storage, Job Temp Storage, Managed User Volume Storage | Storage usage, unit: `yuan/GB/day` or `yuan/GiB/day` |
38
+ | `network` | Query Internet Data Transfer | Public internet egress, unit: `yuan/gb` |
39
+ | `ai` | AI model calls (multiple models, input/output billed separately) | AI function consumption, unit: `M Tokens` |
40
+
41
+ ***
42
+
43
+ ## Query Examples
44
+
45
+ ### Total cost by SKU category over the last 7 days
46
+
47
+ ```
48
+ SELECT
49
+ sku_category,
50
+ SUM(measurements_consumption) AS total_consumption,
51
+ SUM(amount) AS amount_before_discount,
52
+ SUM(total_after_discount) AS total_cost
53
+ FROM sys.information_schema.instance_usage
54
+ WHERE measurement_start >= CURRENT_DATE() - INTERVAL 7 DAYS
55
+ GROUP BY sku_category
56
+ ORDER BY total_cost DESC;
57
+ ```
58
+
59
+ ### Monthly cost ranking by workspace
60
+
61
+ ```
62
+ SELECT
63
+ workspace_name,
64
+ SUM(total_after_discount) AS total_cost
65
+ FROM sys.information_schema.instance_usage
66
+ WHERE measurement_start >= DATE_TRUNC('month', CURRENT_DATE())
67
+ GROUP BY workspace_name
68
+ ORDER BY total_cost DESC;
69
+ ```
70
+
71
+ ### Daily cost trend for a specific workspace
72
+
73
+ ```
74
+ SELECT
75
+ DATE(measurement_start) AS date,
76
+ sku_category,
77
+ SUM(total_after_discount) AS daily_cost
78
+ FROM sys.information_schema.instance_usage
79
+ WHERE workspace_name = '<your_workspace>'
80
+ AND measurement_start >= CURRENT_DATE() - INTERVAL 30 DAYS
81
+ GROUP BY DATE(measurement_start), sku_category
82
+ ORDER BY date DESC, daily_cost DESC;
83
+ ```
84
+
85
+ ### CRU consumption breakdown for compute clusters
86
+
87
+ ```
88
+ SELECT
89
+ workspace_name,
90
+ sku_name,
91
+ DATE(measurement_start) AS date,
92
+ measurements_consumption AS cru_hours,
93
+ total_after_discount AS cost
94
+ FROM sys.information_schema.instance_usage
95
+ WHERE sku_category = 'compute'
96
+ AND measurement_start >= CURRENT_DATE() - INTERVAL 7 DAYS
97
+ ORDER BY date DESC, cost DESC;
98
+ ```
99
+
100
+ ### Workspaces exceeding a storage threshold
101
+
102
+ ```
103
+ SELECT
104
+ workspace_name,
105
+ sku_name,
106
+ DATE(measurement_start) AS date,
107
+ measurements_consumption AS storage_gib
108
+ FROM sys.information_schema.instance_usage
109
+ WHERE sku_category = 'storage'
110
+ AND measurements_consumption > 100
111
+ AND measurement_start >= CURRENT_DATE() - INTERVAL 7 DAYS
112
+ ORDER BY storage_gib DESC;
113
+ ```
114
+
115
+ ### AI function token consumption
116
+
117
+ ```
118
+ SELECT
119
+ workspace_name,
120
+ sku_name,
121
+ SUM(measurements_consumption) AS total_tokens_m,
122
+ SUM(total_after_discount) AS total_cost
123
+ FROM sys.information_schema.instance_usage
124
+ WHERE sku_category = 'ai'
125
+ GROUP BY workspace_name, sku_name
126
+ ORDER BY total_cost DESC;
127
+ ```
128
+
129
+ ***
130
+
131
+ ## Notes
132
+
133
+ * `storage` SKUs are measured at **daily** granularity; all other categories are measured **hourly**.
134
+ * Data is not real-time — there is approximately a 4-hour delay before records appear.
135
+ * `price_rate` is a string type. Cast it before arithmetic: `CAST(price_rate AS DOUBLE)`.
136
+ * `total_after_discount` is the final billed amount. `amount` is the pre-discount gross. The difference is the discount applied.
137
+
138
+ > ⚠️ **Note**: This view requires a user with the `instance_admin` role connected to the `sys` workspace. If your current workspace is not `sys`, use the three-part notation `sys.information_schema.instance_usage` to query across workspaces. Users without `instance_admin` will get empty results.
@@ -23,7 +23,7 @@ Enter a number: 1
23
23
  service (cn-shanghai-alicloud.api.clickzetta.com): cn-shanghai-alicloud.api.clickzetta.com
24
24
  instance (your_instance): <your_instance>
25
25
  workspace (your_workspace): <your_workspace>
26
- vcluster (default_ap): default
26
+ vcluster (default_ap): DEFAULT
27
27
  username (your_username): <user_name>
28
28
  schema (default schema): dbt_dev
29
29
  password (password): <your_passwd>
@@ -49,7 +49,7 @@ cz_dbt_project:
49
49
  password: <passwd>
50
50
  workspace: <your_workspace_name>
51
51
  schema: dbt_prod
52
- vcluster: default
52
+ vcluster: DEFAULT
53
53
  dev:
54
54
  type: clickzetta
55
55
  service: cn-shanghai-alicloud.api.clickzetta.com
@@ -58,7 +58,7 @@ cz_dbt_project:
58
58
  password: <passwd>
59
59
  workspace: <your_workspace_name>
60
60
  schema: dbt_dev
61
- vcluster: default
61
+ vcluster: DEFAULT
62
62
  ```
63
63
 
64
64
  4. Verify the configuration
@@ -152,7 +152,7 @@ public class Kafka2Lakehouse {
152
152
  }
153
153
  // Initialize Lakehouse client and realtimeStream
154
154
  private static void initialize() throws Exception {
155
- String url = MessageFormat.format("jdbc:clickzetta://jnsxwfyr.uat-api.clickzetta.com/{0}?" + "schema={1}&username={2}&password={3}&vcluster={4}", workspace, schema, user, password, vc);
155
+ String url = MessageFormat.format("jdbc:clickzetta://jnsxwfyr.api.clickzetta.com/{0}?" + "schema={1}&username={2}&password={3}&vcluster={4}", workspace, schema, user, password, vc);
156
156
  Options options = Options.builder().withMutationBufferLinesNum(10).build();
157
157
  client = ClickZettaClient.newBuilder().url(url).build();
158
158
  realtimeStream = client.newRealtimeStreamBuilder().operate(RowStream.RealTimeOperate.APPEND_ONLY).options(options).schema(schema).table(table).build();
@@ -18,7 +18,7 @@ This document introduces how to use the Java SDK's BulkloadStream to batch load
18
18
 
19
19
  # Usage Example
20
20
 
21
- This example uses reading a local CSV file. The dataset used is the olist_order_items_dataset data from the [Brazilian E-commerce](https://www.kaggle.com/datasets/olistbr/brazilian-ecommerce?select=olist_order_items_dataset.csv) public dataset. If the data source is within the range supported by object storage or Lakehouse Studio data integration, it is recommended to use the COPY command or data integration features.
21
+ This example uses reading a local CSV file. The dataset used is the olist\_order\_items\_dataset data from the [Brazilian E-commerce](https://www.kaggle.com/datasets/olistbr/brazilian-ecommerce?select=olist_order_items_dataset.csv) public dataset. If the data source is within the range supported by object storage or Lakehouse Studio data integration, it is recommended to use the COPY command or data integration features.
22
22
 
23
23
  ## Prerequisites
24
24
 
@@ -53,8 +53,8 @@ Add the Lakehouse Maven dependency to the project's `pom.xml` file. The latest v
53
53
 
54
54
  ### Writing Java Code
55
55
 
56
- 1. **Initialize Lakehouse Client and BulkloadStream**: Create the `BulkloadFile` class, initialize the Lakehouse connection and BulkloadStream object.
57
- 2. **Read Local CSV File and Write to Lakehouse**: Use Java IO streams to read the local CSV file and write data to Lakehouse line by line.
56
+ 1. **Initialize Lakehouse Client and BulkloadStream**: Create the `BulkloadFile` class, initialize the Lakehouse connection and BulkloadStream object.
57
+ 2. **Read Local CSV File and Write to Lakehouse**: Use Java IO streams to read the local CSV file and write data to Lakehouse line by line.
58
58
 
59
59
  ```java
60
60