@clickzetta/cz-cli-darwin-arm64 0.5.16 → 0.5.17
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.
- package/bin/cz-cli +0 -0
- package/bin/skills/lakehouse-doc-en/SKILL.md +6 -11
- package/bin/skills/lakehouse-doc-en/references/AIGateway.md +58 -13
- package/bin/skills/lakehouse-doc-en/references/Computation.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/DataSource_Amazon_DocumentDB.md +3 -1
- package/bin/skills/lakehouse-doc-en/references/Foreach.md +14 -14
- package/bin/skills/lakehouse-doc-en/references/JDBC-Driver.md +0 -1
- package/bin/skills/lakehouse-doc-en/references/LakehouseAI-overview.md +21 -8
- package/bin/skills/lakehouse-doc-en/references/LakehouseDataGPT-tour.md +4 -9
- package/bin/skills/lakehouse-doc-en/references/LakehouseStudio-tour.md +14 -19
- package/bin/skills/lakehouse-doc-en/references/Lakehouse_Zilliz_MakeDataReadyforBIandAI.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/Logstash.md +3 -3
- package/bin/skills/lakehouse-doc-en/references/Migrate_Spark_DataEngineeringBestPractices_Project_to_Lakehouse.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/Notebook.md +17 -17
- package/bin/skills/lakehouse-doc-en/references/RemoteFunction-as-udf.md +14 -14
- package/bin/skills/lakehouse-doc-en/references/SQL_External_Catalog_Guide.md +1 -9
- package/bin/skills/lakehouse-doc-en/references/SUMMARY.md +59 -29
- package/bin/skills/lakehouse-doc-en/references/WINDOWFUNCTION.md +99 -57
- package/bin/skills/lakehouse-doc-en/references/Zettapark_Data_Engineering_Demo.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/access-control-configuration.md +1 -8
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-2-5-1.0.md +16 -0
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-3-29-1.0.2.md +14 -0
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-3-8-1.0.1.md +16 -0
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-4-28-1.1.md +29 -0
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-5-12-1.1.1.md +18 -0
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-5-15-1.2.md +9 -0
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-5-21-1.3.md +9 -0
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-5-28-1.4.md +10 -0
- package/bin/skills/lakehouse-doc-en/references/aigw-2026-6-3-1.5.md +9 -0
- package/bin/skills/lakehouse-doc-en/references/alicloud-arn-externalid.md +0 -5
- package/bin/skills/lakehouse-doc-en/references/answer-accuracy-improve.md +120 -103
- package/bin/skills/lakehouse-doc-en/references/application-list.md +1 -3
- package/bin/skills/lakehouse-doc-en/references/approval-list.md +16 -17
- package/bin/skills/lakehouse-doc-en/references/batch-load-parquet-file-into-lakehouse.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/batch_sync.md +9 -9
- package/bin/skills/lakehouse-doc-en/references/batch_sync_Sop.md +2 -2
- package/bin/skills/lakehouse-doc-en/references/batchloadparquetfileintoLakehouse.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/bulkloadv1-python-sdk.md +3 -3
- package/bin/skills/lakehouse-doc-en/references/chart-auto-refresh-guide.md +12 -6
- package/bin/skills/lakehouse-doc-en/references/clickzetta-sample-data.md +3 -3
- package/bin/skills/lakehouse-doc-en/references/code_approval.md +1 -5
- package/bin/skills/lakehouse-doc-en/references/composite_task.md +31 -42
- package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_environment_and_data_generate.md +6 -9
- package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_javasdk_bulkload_realtime.md +4 -10
- package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_kafka_realtime_sync.md +1 -10
- package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_local_file_into_table_by_studio.md +0 -6
- package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_studio_batchload_public_network.md +0 -5
- package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_studio_python_node.md +2 -7
- package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_studio_realtime_cdc_public_network.md +13 -18
- package/bin/skills/lakehouse-doc-en/references/comprehensive_guide_to_ingesting_studio_sql_insert.md +0 -1
- package/bin/skills/lakehouse-doc-en/references/concepts.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/config-datasource.md +5 -7
- package/bin/skills/lakehouse-doc-en/references/connect-with-cli.md +116 -72
- package/bin/skills/lakehouse-doc-en/references/connect-with-cz-cli.md +151 -0
- package/bin/skills/lakehouse-doc-en/references/continue-job.md +9 -17
- package/bin/skills/lakehouse-doc-en/references/create-api-connection.md +315 -286
- package/bin/skills/lakehouse-doc-en/references/create-catalog-connection.md +1 -0
- package/bin/skills/lakehouse-doc-en/references/create-dynamic-table.md +4 -4
- package/bin/skills/lakehouse-doc-en/references/create-external-catalog.md +85 -22
- package/bin/skills/lakehouse-doc-en/references/create-table-ddl.md +45 -0
- package/bin/skills/lakehouse-doc-en/references/creating_alicloud_privatelinkendpoint.md +4 -6
- package/bin/skills/lakehouse-doc-en/references/creating_alicloud_privatelinkservice.md +4 -7
- package/bin/skills/lakehouse-doc-en/references/creating_tencentcloud_privatelinkendpoint.md +2 -7
- package/bin/skills/lakehouse-doc-en/references/creating_tencentcloud_privatelinkservice.md +1 -5
- package/bin/skills/lakehouse-doc-en/references/cz-cli-agent.md +15 -10
- package/bin/skills/lakehouse-doc-en/references/cz-cli-datasource.md +0 -8
- package/bin/skills/lakehouse-doc-en/references/cz-cli-sql.md +2 -45
- package/bin/skills/lakehouse-doc-en/references/cz-cli.md +53 -42
- package/bin/skills/lakehouse-doc-en/references/dashboard-version-management-guide.md +12 -4
- package/bin/skills/lakehouse-doc-en/references/data-integration-intro.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/data-integration.md +29 -27
- package/bin/skills/lakehouse-doc-en/references/data-load-summary.md +3 -3
- package/bin/skills/lakehouse-doc-en/references/data-quality.md +25 -25
- package/bin/skills/lakehouse-doc-en/references/data-sharing.md +31 -54
- package/bin/skills/lakehouse-doc-en/references/data-sources.md +45 -45
- package/bin/skills/lakehouse-doc-en/references/data_catalog.md +23 -25
- package/bin/skills/lakehouse-doc-en/references/data_privacy.md +5 -2
- package/bin/skills/lakehouse-doc-en/references/data_sharing_between_accounts_guide.md +0 -4
- package/bin/skills/lakehouse-doc-en/references/data_visualization.md +4 -15
- package/bin/skills/lakehouse-doc-en/references/dataagent.md +39 -7
- package/bin/skills/lakehouse-doc-en/references/databricks-delta-to-lakehouse-migration.md +168 -0
- package/bin/skills/lakehouse-doc-en/references/databricks-dlt-to-lakehouse-migration.md +331 -0
- package/bin/skills/lakehouse-doc-en/references/databricks-external-catalog-practice.md +367 -0
- package/bin/skills/lakehouse-doc-en/references/databricks-jobs-to-studio-migration.md +199 -0
- package/bin/skills/lakehouse-doc-en/references/databricks-notebook-to-studio-migration.md +350 -0
- package/bin/skills/lakehouse-doc-en/references/databricks-uc-governance-to-lakehouse-migration.md +327 -0
- package/bin/skills/lakehouse-doc-en/references/datagpt-model-config.md +34 -0
- package/bin/skills/lakehouse-doc-en/references/datagpt_data_source.md +50 -37
- package/bin/skills/lakehouse-doc-en/references/datagpt_introduction.md +55 -79
- package/bin/skills/lakehouse-doc-en/references/datagpt_quickstart.md +50 -64
- package/bin/skills/lakehouse-doc-en/references/datalake-acceleration.md +75 -2
- package/bin/skills/lakehouse-doc-en/references/dbt-databricks-to-clickzetta-migration.md +242 -0
- package/bin/skills/lakehouse-doc-en/references/dynamic-mask.md +30 -30
- package/bin/skills/lakehouse-doc-en/references/dynamic-table-bestpractice.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/dynamic-table-introduce.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/dynamic_table_summary.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/eco_integration/streamlit.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/eco_integration/superset.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/ecosystem-all.md +1 -3
- package/bin/skills/lakehouse-doc-en/references/ecosystem.md +145 -0
- package/bin/skills/lakehouse-doc-en/references/external-catalog-summary.md +33 -38
- package/bin/skills/lakehouse-doc-en/references/external-function-combo-practice.md +466 -0
- package/bin/skills/lakehouse-doc-en/references/f6fc6447ee.md +7 -9
- package/bin/skills/lakehouse-doc-en/references/federation-query.md +56 -6
- package/bin/skills/lakehouse-doc-en/references/finebi-mysql.md +2 -0
- package/bin/skills/lakehouse-doc-en/references/get-started-with-sample-data.md +10 -11
- package/bin/skills/lakehouse-doc-en/references/gitfolder.md +2 -3
- package/bin/skills/lakehouse-doc-en/references/grant-privileges.md +2 -0
- package/bin/skills/lakehouse-doc-en/references/iceberg-rest-catalog-databricks.md +166 -0
- package/bin/skills/lakehouse-doc-en/references/ide.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/if_else_task.md +59 -57
- package/bin/skills/lakehouse-doc-en/references/input_output.md +10 -7
- package/bin/skills/lakehouse-doc-en/references/jobprofile-bestpractices.md +60 -64
- package/bin/skills/lakehouse-doc-en/references/kafka-connection.md +0 -1
- package/bin/skills/lakehouse-doc-en/references/key-concepts.md +146 -117
- package/bin/skills/lakehouse-doc-en/references/lakehouse-ai-gateway-cz-cli.md +317 -0
- package/bin/skills/lakehouse-doc-en/references/lakehouse-ai-sql-analysis.md +345 -0
- package/bin/skills/lakehouse-doc-en/references/lakehouse-dqc-guide.md +300 -0
- package/bin/skills/lakehouse-doc-en/references/lakehouse-medallion-sql-dt-guide.md +543 -0
- package/bin/skills/lakehouse-doc-en/references/lakehouse-multi-cloud-acceleration.md +274 -0
- package/bin/skills/lakehouse-doc-en/references/lakehouse-multimodal-ai-pipeline.md +198 -0
- package/bin/skills/lakehouse-doc-en/references/lakehouse-quick-experience_guide.md +49 -52
- package/bin/skills/lakehouse-doc-en/references/lakehouse-volume-pipe-acceleration-guide.md +380 -0
- package/bin/skills/lakehouse-doc-en/references/langchain-plug-installation.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/management.md +4 -9
- package/bin/skills/lakehouse-doc-en/references/medallion-lakehouse-from-scratch.md +2 -1
- package/bin/skills/lakehouse-doc-en/references/metrics_answer_build.md +58 -21
- package/bin/skills/lakehouse-doc-en/references/migrate-spark-data-engineering-best-practices-to-lakehouse.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/mindsdb.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/monitoring_and_alerting.md +65 -60
- package/bin/skills/lakehouse-doc-en/references/monitoring_item_specification.md +33 -33
- package/bin/skills/lakehouse-doc-en/references/multitable_batch_sync.md +16 -16
- package/bin/skills/lakehouse-doc-en/references/multitable_realtime_sync.md +65 -72
- package/bin/skills/lakehouse-doc-en/references/multitable_realtime_sync_sop.md +54 -52
- package/bin/skills/lakehouse-doc-en/references/navicat-mysql.md +2 -0
- package/bin/skills/lakehouse-doc-en/references/om-dynamic-table.md +71 -66
- package/bin/skills/lakehouse-doc-en/references/om-vcluster.md +2 -0
- package/bin/skills/lakehouse-doc-en/references/open-api-create-session.md +79 -0
- package/bin/skills/lakehouse-doc-en/references/open-api-generate-auth-token.md +63 -0
- package/bin/skills/lakehouse-doc-en/references/open-api-overview.md +96 -0
- package/bin/skills/lakehouse-doc-en/references/open-api-quick-start.md +286 -0
- package/bin/skills/lakehouse-doc-en/references/open-api-response-guide.md +264 -0
- package/bin/skills/lakehouse-doc-en/references/open-api-safe-question-poll.md +201 -0
- package/bin/skills/lakehouse-doc-en/references/open-api-text2insight-query.md +99 -0
- package/bin/skills/lakehouse-doc-en/references/open-api-text2insight-stop.md +74 -0
- package/bin/skills/lakehouse-doc-en/references/overview.md +6 -7
- package/bin/skills/lakehouse-doc-en/references/permission-application.md +5 -5
- package/bin/skills/lakehouse-doc-en/references/pipe-introduction.md +1 -0
- package/bin/skills/lakehouse-doc-en/references/pipe-kafka-table-stream.md +72 -70
- package/bin/skills/lakehouse-doc-en/references/pipe-kafka.md +105 -110
- package/bin/skills/lakehouse-doc-en/references/pipe-overview.md +40 -40
- package/bin/skills/lakehouse-doc-en/references/pipe-storage-object.md +43 -48
- package/bin/skills/lakehouse-doc-en/references/pipe-summary.md +14 -4
- package/bin/skills/lakehouse-doc-en/references/pipe-syntax.md +58 -151
- package/bin/skills/lakehouse-doc-en/references/practice_python_task.md +4 -4
- package/bin/skills/lakehouse-doc-en/references/pricing-ai-gateway.md +181 -0
- package/bin/skills/lakehouse-doc-en/references/pricing-lakehouse.md +316 -0
- package/bin/skills/lakehouse-doc-en/references/pricing.md +44 -288
- package/bin/skills/lakehouse-doc-en/references/private-link-general.md +0 -2
- package/bin/skills/lakehouse-doc-en/references/pyspark-to-zettapark-migration-f1.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/python-igs.md +7 -3
- package/bin/skills/lakehouse-doc-en/references/python-sample-put-github-rt-events.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/python-task.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/python_reference/connector.md +3 -3
- package/bin/skills/lakehouse-doc-en/references/python_reference/connector_advanced.md +2 -2
- package/bin/skills/lakehouse-doc-en/references/python_reference/connector_examples.md +2 -2
- package/bin/skills/lakehouse-doc-en/references/python_sdk_guide.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/python_shell_datasource.md +11 -9
- package/bin/skills/lakehouse-doc-en/references/quick_start_batch_sync_data.md +9 -18
- package/bin/skills/lakehouse-doc-en/references/quick_start_bi_analysis.md +8 -25
- package/bin/skills/lakehouse-doc-en/references/quick_start_create_workspace.md +4 -6
- package/bin/skills/lakehouse-doc-en/references/quick_start_data_quality.md +8 -8
- package/bin/skills/lakehouse-doc-en/references/quick_start_etl.md +16 -20
- package/bin/skills/lakehouse-doc-en/references/quick_start_monitoring_and_alerting.md +10 -18
- package/bin/skills/lakehouse-doc-en/references/quick_start_sql_query.md +7 -10
- package/bin/skills/lakehouse-doc-en/references/quick_start_upload_data.md +5 -7
- package/bin/skills/lakehouse-doc-en/references/quick_start_user_management.md +8 -8
- package/bin/skills/lakehouse-doc-en/references/quick_start_workspace.md +0 -5
- package/bin/skills/lakehouse-doc-en/references/quick_start_workspace_user.md +8 -8
- package/bin/skills/lakehouse-doc-en/references/quickstart.md +69 -56
- package/bin/skills/lakehouse-doc-en/references/quickstart_datashare_between_companies.md +0 -5
- package/bin/skills/lakehouse-doc-en/references/quickstart_envirment_for_team.md +0 -24
- package/bin/skills/lakehouse-doc-en/references/realtime-pipeline-selection-guide.md +1 -2
- package/bin/skills/lakehouse-doc-en/references/realtime-sales-dashboard-with-dynamic-table.md +3 -3
- package/bin/skills/lakehouse-doc-en/references/realtime_sync.md +0 -1
- package/bin/skills/lakehouse-doc-en/references/release-note-2026-05-19.md +5 -3
- package/bin/skills/lakehouse-doc-en/references/revoke-privileges.md +3 -1
- package/bin/skills/lakehouse-doc-en/references/roles.md +2 -3
- package/bin/skills/lakehouse-doc-en/references/row-filter.md +165 -0
- package/bin/skills/lakehouse-doc-en/references/row_level_permission.md +30 -19
- package/bin/skills/lakehouse-doc-en/references/scheduled_task.md +28 -21
- package/bin/skills/lakehouse-doc-en/references/security_overview.md +99 -21
- package/bin/skills/lakehouse-doc-en/references/set-command.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/setup.md +13 -15
- package/bin/skills/lakehouse-doc-en/references/show-grants.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/snowflake-dynamic-tables-to-lakehouse.md +2 -2
- package/bin/skills/lakehouse-doc-en/references/spark-connector-summary.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/sql_functions/context_functions/current_vcluster.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/sso-configuration.md +2 -2
- package/bin/skills/lakehouse-doc-en/references/streaming_pipeline_with_dynamic_table.md +0 -1
- package/bin/skills/lakehouse-doc-en/references/studio-incremental-sync-practice.md +27 -23
- package/bin/skills/lakehouse-doc-en/references/studio-shell-task.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/supported-cloud-platforms.md +32 -0
- package/bin/skills/lakehouse-doc-en/references/table_rendering.md +18 -12
- package/bin/skills/lakehouse-doc-en/references/task-develop.md +89 -91
- package/bin/skills/lakehouse-doc-en/references/task_development.md +19 -17
- package/bin/skills/lakehouse-doc-en/references/task_group.md +16 -14
- package/bin/skills/lakehouse-doc-en/references/task_instance.md +21 -21
- package/bin/skills/lakehouse-doc-en/references/task_param.md +38 -35
- package/bin/skills/lakehouse-doc-en/references/task_param_reference.md +81 -79
- package/bin/skills/lakehouse-doc-en/references/task_scheduling_dependency.md +20 -21
- package/bin/skills/lakehouse-doc-en/references/tencentcloud_arn_and_externalid.md +1 -5
- package/bin/skills/lakehouse-doc-en/references/trial-account-quotas-and-limits.md +1 -3
- package/bin/skills/lakehouse-doc-en/references/tutorial_connect_to_lakehouse.md +69 -0
- package/bin/skills/lakehouse-doc-en/references/tutorials.md +4 -1
- package/bin/skills/lakehouse-doc-en/references/unique-key.md +167 -0
- package/bin/skills/lakehouse-doc-en/references/usageandbillingview.md +138 -0
- package/bin/skills/lakehouse-doc-en/references/use-dbt-dev.md +3 -3
- package/bin/skills/lakehouse-doc-en/references/use-java-sdk-realtime-uploaddata.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/use-java-sdk-upload-data-local.md +3 -3
- package/bin/skills/lakehouse-doc-en/references/use-models.md +128 -0
- package/bin/skills/lakehouse-doc-en/references/use-mysql-client.md +81 -81
- package/bin/skills/lakehouse-doc-en/references/use-python-sdk-upload-data.md +10 -12
- package/bin/skills/lakehouse-doc-en/references/user-identification.md +2 -3
- package/bin/skills/lakehouse-doc-en/references/user_permission_grand_guide.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/using-udf-in-dynamic-table.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/vc_cache.md +18 -22
- package/bin/skills/lakehouse-doc-en/references/vcluster_size_description.md +33 -31
- package/bin/skills/lakehouse-doc-en/references/virtual-cluster.md +43 -45
- package/bin/skills/lakehouse-doc-en/references/web-job-history.md +94 -108
- package/bin/skills/lakehouse-doc-en/references/web_search.md +16 -7
- package/bin/skills/lakehouse-doc-en/references/zettapark-data-engineering-demo.md +1 -1
- package/bin/skills/lakehouse-doc-en/references/zettapark-dataframe-guide.md +144 -70
- package/bin/skills/lakehouse-doc-en/references/zettapark-dynamic-table-guide.md +2 -2
- package/bin/skills/lakehouse-doc-en/references/zettapark-etl-guide.md +73 -33
- package/bin/skills/lakehouse-doc-en/references/zettapark-feature-engineering.md +2 -2
- package/bin/skills/lakehouse-doc-en/references/zettapark-functions-guide.md +75 -46
- package/bin/skills/lakehouse-doc-en/references/zettapark-quick-start.md +2 -2
- package/bin/skills/lakehouse-doc-en/references/zettapark-stream-guide.md +4 -4
- package/bin/skills/lakehouse-doc-en/references/zettapark-volume-guide.md +93 -29
- package/package.json +1 -1
- package/bin/skills/lakehouse-doc-en/references/CLAUDE.md +0 -606
- package/bin/skills/lakehouse-doc-en/references/modelprice.md +0 -155
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Open API Overview
|
|
2
|
+
|
|
3
|
+
## What Is This
|
|
4
|
+
|
|
5
|
+
The Open API lets you call Analytics Agent's data analysis capabilities through standard HTTP interfaces. You simply send a natural language question, and the system automatically handles data querying, metric calculation, knowledge retrieval, and visualization generation, returning structured analysis results.
|
|
6
|
+
|
|
7
|
+
In short: **it turns Analytics Agent's conversational capabilities into a programmable interface**.
|
|
8
|
+
|
|
9
|
+
## Use Cases
|
|
10
|
+
|
|
11
|
+
| Use Case | Description |
|
|
12
|
+
|----------|-------------|
|
|
13
|
+
| Embed in internal systems | Integrate data Q&A capabilities into your business systems. Users ask questions in natural language, and the backend calls the API asynchronously to retrieve and display analysis results. |
|
|
14
|
+
| Automated workflows | Connect the API to automated processes. Trigger data analysis on a schedule or by events, retrieve structured results, and let your system handle subsequent processing (e.g., generate reports, write to a database). |
|
|
15
|
+
| Custom application integration | Call the Agent's analysis capabilities from your own BI tools or data platforms to retrieve metric calculation results and SQL, which your application then renders and displays. |
|
|
16
|
+
|
|
17
|
+
## What You Get
|
|
18
|
+
|
|
19
|
+
After calling the API, you receive the same analysis process and results as asking a question on the Analytics Agent page, including:
|
|
20
|
+
|
|
21
|
+
- **Knowledge retrieval results** — Business rules and definition entries returned by the Agent after consulting the knowledge base
|
|
22
|
+
- **Metric calculation results** — Semantic layer DSL (metricDsl) and physical layer DSL (physicalMetricDsl)
|
|
23
|
+
- **SQL statements** — Query SQL generated by the Agent (which you can execute in your system to retrieve data)
|
|
24
|
+
- **Chart metadata** — Chart type, column definitions, and corresponding SQL (your application must execute the SQL and render the chart)
|
|
25
|
+
- **Analysis summary** — A text summary in Markdown format with data interpretation
|
|
26
|
+
|
|
27
|
+
> Note: The API returns analysis process data and structured results. Presentation-layer tasks such as chart rendering and report formatting must be completed by your application.
|
|
28
|
+
|
|
29
|
+
## 5-Minute Quick Start
|
|
30
|
+
|
|
31
|
+
For a complete end-to-end example, see → [Quick Start](open-api-quick-start)
|
|
32
|
+
|
|
33
|
+
The core flow is just 4 steps:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
① Get Token → ② Create Session → ③ Ask Question → ④ Poll for Results
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Minimal code (Python):
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
import requests, time
|
|
43
|
+
|
|
44
|
+
BASE = "https://api.clickzetta.com/clickzetta-campaign-data" # Domestic SaaS environment
|
|
45
|
+
SECRET_KEY = "your_app_secret_key"
|
|
46
|
+
|
|
47
|
+
# ① Get Token
|
|
48
|
+
token = requests.get(f"{BASE}/open/api/v1/appSecretKey/generateAuthToken",
|
|
49
|
+
params={"appSecretKey": SECRET_KEY}).json()["data"]["token"]
|
|
50
|
+
|
|
51
|
+
# ② Create Session
|
|
52
|
+
session_id = requests.post(f"{BASE}/open/session/safe_new",
|
|
53
|
+
params={"tenantId": 10, "userId": 1, "loginToken": token},
|
|
54
|
+
json={"tenantId": 10, "userId": 1, "domainId": 106,
|
|
55
|
+
"title": "API Test", "loginToken": token}
|
|
56
|
+
).json()["data"]
|
|
57
|
+
|
|
58
|
+
# ③ Ask Question
|
|
59
|
+
question_id = requests.post(f"{BASE}/open/text2insight/query",
|
|
60
|
+
params={"tenantId": 10, "userId": 1, "loginToken": token},
|
|
61
|
+
json={"tenantId": 10, "userId": 1, "domainId": 106,
|
|
62
|
+
"sessionId": session_id, "msg": "Sales trend by region for the past 6 months", "loginToken": token}
|
|
63
|
+
).json()["data"]["questionId"]
|
|
64
|
+
|
|
65
|
+
# ④ Poll for Results
|
|
66
|
+
while True:
|
|
67
|
+
result = requests.post(f"{BASE}/open/safe_question_poll",
|
|
68
|
+
params={"tenantId": 10, "userId": 1, "loginToken": token},
|
|
69
|
+
json={"tenantId": 10, "userId": 1, "domainId": 106,
|
|
70
|
+
"questionId": question_id, "loginToken": token}
|
|
71
|
+
).json()
|
|
72
|
+
responses = result["data"]["responses"]
|
|
73
|
+
last_type = responses[-1].get("dataType", "")
|
|
74
|
+
if last_type in ("finish", "finish_stop", "error"):
|
|
75
|
+
break
|
|
76
|
+
time.sleep(2)
|
|
77
|
+
|
|
78
|
+
# Print final results
|
|
79
|
+
for r in responses:
|
|
80
|
+
print(f"[{r.get('dataType')}] {r.get('message', '')[:80]}")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## API Interface List
|
|
84
|
+
|
|
85
|
+
| Interface | Description | Required |
|
|
86
|
+
|-----------|-------------|----------|
|
|
87
|
+
| [GenerateAuthToken](open-api-generate-auth-token) | Obtain authentication Token | Yes |
|
|
88
|
+
| [CreateSession](open-api-create-session) | Create a conversation session | No (can reuse an existing sessionId) |
|
|
89
|
+
| [Text2InsightQuery](open-api-text2insight-query) | Submit a data analysis request | Yes |
|
|
90
|
+
| [SafeQuestionPoll](open-api-safe-question-poll) | Poll for question results | Yes |
|
|
91
|
+
| [Text2InsightStop](open-api-text2insight-stop) | Stop a running analysis task | No |
|
|
92
|
+
|
|
93
|
+
## More Guides
|
|
94
|
+
|
|
95
|
+
- [Quick Start](open-api-quick-start) — Complete end-to-end code examples (curl + Python)
|
|
96
|
+
- [Understanding Response Results](open-api-response-guide) — Message type descriptions, display recommendations, and real output examples
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Open API Quick Start
|
|
2
|
+
|
|
3
|
+
> This guide helps you complete your first API call in 5 minutes, from asking a question to receiving analysis results.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
Before you begin, prepare the following information:
|
|
8
|
+
|
|
9
|
+
| Item | Description | How to Obtain |
|
|
10
|
+
|------|-------------|---------------|
|
|
11
|
+
| API Base URL | Base URL for interface requests | See the section below |
|
|
12
|
+
| appSecretKey | Application secret key used to obtain an authentication Token | Generated by admin on the User Management page |
|
|
13
|
+
| tenantId | Tenant ID | View on the Settings configuration page |
|
|
14
|
+
| userId | User ID | View on the Settings configuration page |
|
|
15
|
+
| domainId | Analytics domain ID | Obtained from the URL on the analytics domain settings page |
|
|
16
|
+
|
|
17
|
+
### API Base URL
|
|
18
|
+
|
|
19
|
+
| Environment | Base URL |
|
|
20
|
+
|-------------|----------|
|
|
21
|
+
| Domestic SaaS | `https://api.clickzetta.com/clickzetta-campaign-data` |
|
|
22
|
+
| Overseas (Singapore) | `https://ap-southeast-1-alicloud.api.singdata.com/clickzetta-campaign-data` |
|
|
23
|
+
| Private Deployment (OP) | Contact your implementation team; each environment differs |
|
|
24
|
+
|
|
25
|
+
### Obtaining appSecretKey
|
|
26
|
+
|
|
27
|
+
Go to **Admin → User Management**, select the corresponding user, click Edit, and in the "App Secret Key" section click + **Generate Key**.
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
### Obtaining tenantId and userId
|
|
32
|
+
|
|
33
|
+
Click the avatar in the bottom-left corner to go to the **Settings** configuration page:
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
On the configuration page, you can see **Tenant ID** and **User ID**:
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
### Obtaining domainId
|
|
42
|
+
|
|
43
|
+
Click the settings button (gear icon) on the analytics domain card:
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
On the settings page, look at the browser address bar URL — the number at the end is the **domainId**:
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
## Complete Flow (curl)
|
|
52
|
+
|
|
53
|
+
### Step 1: Get a Token
|
|
54
|
+
|
|
55
|
+
For detailed parameters, see → [GenerateAuthToken](open-api-generate-auth-token)
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
curl "https://api.clickzetta.com/clickzetta-campaign-data/open/api/v1/appSecretKey/generateAuthToken?appSecretKey=YOUR_SECRET_KEY"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Response:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"success": true,
|
|
66
|
+
"data": {
|
|
67
|
+
"token": "eyJhbGciOiJIUzI1NiJ9..."
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Save the `data.token` value — it is required for all subsequent requests.
|
|
73
|
+
|
|
74
|
+
### Step 2: Create a Session (Optional)
|
|
75
|
+
|
|
76
|
+
For detailed parameters, see → [CreateSession](open-api-create-session)
|
|
77
|
+
|
|
78
|
+
If you already have a sessionId, you can skip this step.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
curl -X POST "https://api.clickzetta.com/clickzetta-campaign-data/open/session/safe_new?tenantId=YOUR_TENANT_ID&userId=YOUR_USER_ID&loginToken=YOUR_TOKEN" \
|
|
82
|
+
-H "Content-Type: application/json" \
|
|
83
|
+
-d '{
|
|
84
|
+
"tenantId": YOUR_TENANT_ID,
|
|
85
|
+
"userId": YOUR_USER_ID,
|
|
86
|
+
"domainId": YOUR_DOMAIN_ID,
|
|
87
|
+
"title": "My First API Call",
|
|
88
|
+
"loginToken": "YOUR_TOKEN"
|
|
89
|
+
}'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Response:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"success": true,
|
|
97
|
+
"data": 4729
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`data` is your `sessionId`.
|
|
102
|
+
|
|
103
|
+
### Step 3: Ask a Question
|
|
104
|
+
|
|
105
|
+
For detailed parameters, see → [Text2InsightQuery](open-api-text2insight-query)
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
curl -X POST "https://api.clickzetta.com/clickzetta-campaign-data/open/text2insight/query?tenantId=YOUR_TENANT_ID&userId=YOUR_USER_ID&loginToken=YOUR_TOKEN" \
|
|
109
|
+
-H "Content-Type: application/json" \
|
|
110
|
+
-d '{
|
|
111
|
+
"tenantId": YOUR_TENANT_ID,
|
|
112
|
+
"userId": YOUR_USER_ID,
|
|
113
|
+
"domainId": YOUR_DOMAIN_ID,
|
|
114
|
+
"sessionId": YOUR_SESSION_ID,
|
|
115
|
+
"msg": "Show me the sales trend by region for the past 6 months",
|
|
116
|
+
"loginToken": "YOUR_TOKEN"
|
|
117
|
+
}'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Response:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"success": true,
|
|
125
|
+
"data": {
|
|
126
|
+
"questionId": 34339,
|
|
127
|
+
"sessionId": 4729,
|
|
128
|
+
"status": "running"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Save the `data.questionId`.
|
|
134
|
+
|
|
135
|
+
### Step 4: Poll for Results
|
|
136
|
+
|
|
137
|
+
For detailed parameters, see → [SafeQuestionPoll](open-api-safe-question-poll)
|
|
138
|
+
|
|
139
|
+
Call every 2 seconds until the `dataType` of the last message is `finish`, `finish_stop`, or `error`.
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
curl -X POST "https://api.clickzetta.com/clickzetta-campaign-data/open/safe_question_poll?tenantId=YOUR_TENANT_ID&userId=YOUR_USER_ID&loginToken=YOUR_TOKEN" \
|
|
143
|
+
-H "Content-Type: application/json" \
|
|
144
|
+
-d '{
|
|
145
|
+
"tenantId": YOUR_TENANT_ID,
|
|
146
|
+
"userId": YOUR_USER_ID,
|
|
147
|
+
"domainId": YOUR_DOMAIN_ID,
|
|
148
|
+
"questionId": YOUR_QUESTION_ID,
|
|
149
|
+
"loginToken": "YOUR_TOKEN"
|
|
150
|
+
}'
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
When the analysis is complete, the response will contain the full `responses` array. For how to interpret these returned contents, see [Understanding Response Results](open-api-response-guide).
|
|
154
|
+
|
|
155
|
+
## Complete Flow (Python)
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
import requests
|
|
159
|
+
import time
|
|
160
|
+
import json
|
|
161
|
+
|
|
162
|
+
# === Configuration ===
|
|
163
|
+
BASE_URL = "https://api.clickzetta.com/clickzetta-campaign-data" # Domestic SaaS environment
|
|
164
|
+
APP_SECRET_KEY = "your_app_secret_key"
|
|
165
|
+
TENANT_ID = 10
|
|
166
|
+
USER_ID = 1
|
|
167
|
+
DOMAIN_ID = 106
|
|
168
|
+
|
|
169
|
+
# === Step 1: Get Token ===
|
|
170
|
+
resp = requests.get(
|
|
171
|
+
f"{BASE_URL}/open/api/v1/appSecretKey/generateAuthToken",
|
|
172
|
+
params={"appSecretKey": APP_SECRET_KEY}
|
|
173
|
+
)
|
|
174
|
+
token = resp.json()["data"]["token"]
|
|
175
|
+
print(f"Token obtained successfully")
|
|
176
|
+
|
|
177
|
+
# === Step 2: Create Session ===
|
|
178
|
+
resp = requests.post(
|
|
179
|
+
f"{BASE_URL}/open/session/safe_new",
|
|
180
|
+
params={"tenantId": TENANT_ID, "userId": USER_ID, "loginToken": token},
|
|
181
|
+
json={"tenantId": TENANT_ID, "userId": USER_ID, "domainId": DOMAIN_ID,
|
|
182
|
+
"title": "API Quick Start", "loginToken": token}
|
|
183
|
+
)
|
|
184
|
+
session_id = resp.json()["data"]
|
|
185
|
+
print(f"Session created successfully, sessionId = {session_id}")
|
|
186
|
+
|
|
187
|
+
# === Step 3: Ask Question ===
|
|
188
|
+
resp = requests.post(
|
|
189
|
+
f"{BASE_URL}/open/text2insight/query",
|
|
190
|
+
params={"tenantId": TENANT_ID, "userId": USER_ID, "loginToken": token},
|
|
191
|
+
json={"tenantId": TENANT_ID, "userId": USER_ID, "domainId": DOMAIN_ID,
|
|
192
|
+
"sessionId": session_id, "msg": "Show me the sales trend by region for the past 6 months", "loginToken": token}
|
|
193
|
+
)
|
|
194
|
+
question_id = resp.json()["data"]["questionId"]
|
|
195
|
+
print(f"Question submitted successfully, questionId = {question_id}")
|
|
196
|
+
|
|
197
|
+
# === Step 4: Poll for Results ===
|
|
198
|
+
print("Waiting for analysis to complete...")
|
|
199
|
+
poll_count = 0
|
|
200
|
+
max_polls = 180 # Poll at most 180 times (360 seconds)
|
|
201
|
+
|
|
202
|
+
while poll_count < max_polls:
|
|
203
|
+
time.sleep(2)
|
|
204
|
+
poll_count += 1
|
|
205
|
+
|
|
206
|
+
resp = requests.post(
|
|
207
|
+
f"{BASE_URL}/open/safe_question_poll",
|
|
208
|
+
params={"tenantId": TENANT_ID, "userId": USER_ID, "loginToken": token},
|
|
209
|
+
json={"tenantId": TENANT_ID, "userId": USER_ID, "domainId": DOMAIN_ID,
|
|
210
|
+
"questionId": question_id, "loginToken": token}
|
|
211
|
+
)
|
|
212
|
+
data = resp.json()["data"]
|
|
213
|
+
responses = data.get("responses", [])
|
|
214
|
+
|
|
215
|
+
if not responses:
|
|
216
|
+
continue
|
|
217
|
+
|
|
218
|
+
last_type = responses[-1].get("dataType", "")
|
|
219
|
+
if last_type in ("finish", "finish_stop", "error"):
|
|
220
|
+
print(f"Analysis complete (polled {poll_count} times)")
|
|
221
|
+
break
|
|
222
|
+
|
|
223
|
+
# === Display Results ===
|
|
224
|
+
print("\n" + "=" * 60)
|
|
225
|
+
print("Analysis Results:")
|
|
226
|
+
print("=" * 60)
|
|
227
|
+
|
|
228
|
+
for i, r in enumerate(responses):
|
|
229
|
+
data_type = r.get("dataType", "unknown")
|
|
230
|
+
|
|
231
|
+
if data_type == "summary":
|
|
232
|
+
# Analysis summary
|
|
233
|
+
summary = r.get("modelRes", {}).get("data", {}).get("summaryData") or r.get("message", "")
|
|
234
|
+
print(f"\nAnalysis Summary:\n{summary}")
|
|
235
|
+
|
|
236
|
+
elif data_type == "metric":
|
|
237
|
+
# Metric calculation
|
|
238
|
+
message = r.get("message", "")
|
|
239
|
+
print(f"\nMetric: {message}")
|
|
240
|
+
|
|
241
|
+
elif data_type == "echarts_plus":
|
|
242
|
+
# Chart
|
|
243
|
+
message = r.get("message", "")
|
|
244
|
+
sql = r.get("modelRes", {}).get("data", {}).get("calculateSql", "")
|
|
245
|
+
print(f"\nChart: {message}")
|
|
246
|
+
if sql:
|
|
247
|
+
print(f" SQL: {sql[:100]}...")
|
|
248
|
+
|
|
249
|
+
elif data_type == "error":
|
|
250
|
+
print(f"\nError: {r.get('message', '')}")
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Sample Output
|
|
254
|
+
|
|
255
|
+
Running the Python script above produces output similar to this:
|
|
256
|
+
|
|
257
|
+
```text
|
|
258
|
+
Token obtained successfully
|
|
259
|
+
Session created successfully, sessionId = 4729
|
|
260
|
+
Question submitted successfully, questionId = 34339
|
|
261
|
+
Waiting for analysis to complete...
|
|
262
|
+
Analysis complete (polled 36 times)
|
|
263
|
+
|
|
264
|
+
============================================================
|
|
265
|
+
Analysis Results:
|
|
266
|
+
============================================================
|
|
267
|
+
|
|
268
|
+
Metric: Metric: Total sales by region for the past 6 months
|
|
269
|
+
|
|
270
|
+
Chart: Sales trend by region (2025.07-2026.01)
|
|
271
|
+
SQL: SELECT region, month, SUM(sales) AS total_sales FROM ...
|
|
272
|
+
|
|
273
|
+
Analysis Summary:
|
|
274
|
+
**Sales Trend Analysis by Region:**
|
|
275
|
+
- East China region continues to lead, accounting for 42% of total sales
|
|
276
|
+
- South China region has the fastest growth, up 15% month-over-month
|
|
277
|
+
...
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Next Steps
|
|
281
|
+
|
|
282
|
+
* Understand the meaning of each message type in the response → [Understanding Response Results](open-api-response-guide)
|
|
283
|
+
* View the complete parameter definitions for each interface → [API Interface List](open-api-overview#api-interface-list)
|
|
284
|
+
* Specify a model: add the `modelSettings` parameter when asking a question → [Text2InsightQuery](open-api-text2insight-query)
|
|
285
|
+
|
|
286
|
+
^
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# Understanding Response Results
|
|
2
|
+
|
|
3
|
+
> This guide helps you interpret the `responses` array returned by SafeQuestionPoll, understand the meaning of each message type, and how to display them in your application.
|
|
4
|
+
|
|
5
|
+
## Overall Structure
|
|
6
|
+
|
|
7
|
+
The `responses` returned from polling is a message array that records, in chronological order, all output produced during the Agent's analysis. It is **a mixed list of incremental process messages and final results**.
|
|
8
|
+
|
|
9
|
+
A typical analysis produces the following message sequence:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
notify → message (knowledge retrieval) → message (execution process) → metric → code → echarts_plus → summary → finish
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Not all types appear every time; this depends on the complexity of the question and the analysis path chosen by the Agent.
|
|
16
|
+
|
|
17
|
+
## Message Type Quick Reference
|
|
18
|
+
|
|
19
|
+
| Type | Should You Pay Attention | Description |
|
|
20
|
+
|------|:------------------------:|-------------|
|
|
21
|
+
| **summary** | Yes (required) | Final analysis summary, containing data interpretation and business insights |
|
|
22
|
+
| **metric** | Yes (recommended) | Metric calculation results, including DSL definitions |
|
|
23
|
+
| **echarts_plus** | Yes (recommended) | Chart data, can be used directly for rendering |
|
|
24
|
+
| **code** | Yes (recommended) | Generated code (usually SQL) |
|
|
25
|
+
| **message** | Depends | May contain knowledge details or execution logs |
|
|
26
|
+
| **notify** | Usually ignore | Progress hints, e.g., "Thinking" |
|
|
27
|
+
| **finish** | Status only | Marks the end of analysis |
|
|
28
|
+
| **finish_stop** | Status only | Marks user-initiated stop |
|
|
29
|
+
| **error** | Handle it | Execution error |
|
|
30
|
+
|
|
31
|
+
## Field Reading Rules
|
|
32
|
+
|
|
33
|
+
Business fields in each message may appear at different levels. Read in the following priority:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
1. response.fieldName (top level)
|
|
37
|
+
2. response.modelRes.data.fieldName
|
|
38
|
+
3. JSON.parse(response.rawRes).data.fieldName
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
It is recommended to implement a unified function:
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
def read_field(response, field_name):
|
|
45
|
+
"""Read the specified field from a response in priority order"""
|
|
46
|
+
# Priority 1: top level
|
|
47
|
+
if response.get(field_name):
|
|
48
|
+
return response[field_name]
|
|
49
|
+
# Priority 2: modelRes.data
|
|
50
|
+
model_data = response.get("modelRes", {}).get("data", {})
|
|
51
|
+
if model_data.get(field_name):
|
|
52
|
+
return model_data[field_name]
|
|
53
|
+
# Priority 3: rawRes
|
|
54
|
+
raw_res = response.get("rawRes")
|
|
55
|
+
if raw_res and isinstance(raw_res, str):
|
|
56
|
+
try:
|
|
57
|
+
parsed = json.loads(raw_res)
|
|
58
|
+
if parsed.get("data", {}).get(field_name):
|
|
59
|
+
return parsed["data"][field_name]
|
|
60
|
+
except json.JSONDecodeError:
|
|
61
|
+
pass
|
|
62
|
+
return None
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Detailed Description and Display Recommendations by Type
|
|
66
|
+
|
|
67
|
+
### summary — Analysis Summary
|
|
68
|
+
|
|
69
|
+
**This is the most important message**, containing the final data insights and conclusions.
|
|
70
|
+
|
|
71
|
+
Key fields:
|
|
72
|
+
- `summaryData` — Summary text (Markdown format)
|
|
73
|
+
- If `summaryData` is empty, fall back to `message`
|
|
74
|
+
|
|
75
|
+
Display recommendation: Render directly as Markdown, supporting tables, bold, and other formatting.
|
|
76
|
+
|
|
77
|
+
Actual output example:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
**Beijing Second-hand Housing Total Transaction Amount by District in the Past 6 Years (2015-2021):**
|
|
81
|
+
|
|
82
|
+
- **Knowledge Retrieval**: Consulted knowledge base, confirmed "sales" in the dataset corresponds to transaction price
|
|
83
|
+
- **Metric Calculation**: Used the "Total Transaction Amount" metric
|
|
84
|
+
|
|
85
|
+
**District Rankings by Transaction Amount (unit: CNY 100 million):**
|
|
86
|
+
|
|
87
|
+
| Rank | District | Total Transaction Amount (CNY 100M) |
|
|
88
|
+
|------|----------|-------------------------------------|
|
|
89
|
+
| 1 | Chaoyang | 10349.27 |
|
|
90
|
+
| 2 | Haidian | 5850.22 |
|
|
91
|
+
| 3 | Fengtai | 3411.86 |
|
|
92
|
+
...
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### metric — Metric Calculation Result
|
|
98
|
+
|
|
99
|
+
Generated when the Agent performs calculations through the metric engine.
|
|
100
|
+
|
|
101
|
+
Key fields:
|
|
102
|
+
- `message` — Metric name description
|
|
103
|
+
- `metricDsl` — Semantic layer DSL (JSON)
|
|
104
|
+
- `physicalMetricDsl` — Physical layer DSL (JSON)
|
|
105
|
+
|
|
106
|
+
Display recommendation: Show the metric name. For developer-facing views, DSL details can be collapsed.
|
|
107
|
+
|
|
108
|
+
Actual output example:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
message: Metric: Total Transaction Amount by District in the Past 6 Years
|
|
112
|
+
|
|
113
|
+
metricDsl:
|
|
114
|
+
{
|
|
115
|
+
"metricId": { "metricType": "SQL_SIMPLE", "id": 631 },
|
|
116
|
+
"name": "Total Transaction Amount by District in the Past 6 Years",
|
|
117
|
+
"params": [
|
|
118
|
+
{ "name": "dims", "values": [{ "left": "region" }] },
|
|
119
|
+
{ "name": "filters", "values": [{ "exprItems": [...] }] }
|
|
120
|
+
],
|
|
121
|
+
"metricDefinition": {
|
|
122
|
+
"mainTable": "ns10.public.v_gpt_ns10_datagpt_buildin_beijing_house_transaction",
|
|
123
|
+
"calculationLogic": "SUM(`transaction_price`)"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### echarts_plus — Chart Data
|
|
131
|
+
|
|
132
|
+
Visualization chart configuration generated by the Agent.
|
|
133
|
+
|
|
134
|
+
Key fields:
|
|
135
|
+
- `message` — Chart title
|
|
136
|
+
- `chartType` — Chart type (e.g., ECHARTS)
|
|
137
|
+
- `columns` — Column definitions
|
|
138
|
+
- `calculateSql` — SQL used to retrieve chart data
|
|
139
|
+
|
|
140
|
+
Display recommendation: Use the `calculateSql` query results with `chartType` for frontend rendering.
|
|
141
|
+
|
|
142
|
+
Actual output example:
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
message: Beijing Second-hand Housing Total Transaction Amount by District in the Past 6 Years (2015-2021)
|
|
146
|
+
chartType: ECHARTS
|
|
147
|
+
columns: District (STRING), Total Transaction Amount (10K CNY) (LONG)
|
|
148
|
+
calculateSql:
|
|
149
|
+
SELECT region AS district, SUM(transaction_price) AS total_transaction_amount
|
|
150
|
+
FROM ns10.public.v_gpt_ns10_datagpt_buildin_beijing_house_transaction
|
|
151
|
+
WHERE transaction_date >= '2015.01.01' AND transaction_date <= '2021.01.09'
|
|
152
|
+
GROUP BY region ORDER BY total_transaction_amount DESC
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### code — Code Block
|
|
158
|
+
|
|
159
|
+
Code generated by the Agent, usually SQL.
|
|
160
|
+
|
|
161
|
+
Key fields:
|
|
162
|
+
- `codeType` — Code language (e.g., `sql`)
|
|
163
|
+
- `code` — Code content
|
|
164
|
+
|
|
165
|
+
Actual output example:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
codeType: sql
|
|
169
|
+
code:
|
|
170
|
+
SELECT
|
|
171
|
+
region AS district,
|
|
172
|
+
SUM(transaction_price) AS total_transaction_amount
|
|
173
|
+
FROM ns10.public.v_gpt_ns10_datagpt_buildin_beijing_house_transaction
|
|
174
|
+
WHERE transaction_date >= '2015.01.01' AND transaction_date <= '2021.01.09'
|
|
175
|
+
GROUP BY region
|
|
176
|
+
ORDER BY total_transaction_amount DESC
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### message — General Message
|
|
182
|
+
|
|
183
|
+
This is a "catch-all" type that may contain various content. The content should be further evaluated based on its context.
|
|
184
|
+
|
|
185
|
+
#### Contains Knowledge Details
|
|
186
|
+
|
|
187
|
+
When the message contains `knowledgeData.detailItems`, or the text includes `Knowledge details:` or `Viewed knowledge details:`, it represents knowledge retrieval results.
|
|
188
|
+
|
|
189
|
+
Display recommendation: Extract and display the knowledge entries to help users understand which business rules the Agent referenced.
|
|
190
|
+
|
|
191
|
+
Actual output example:
|
|
192
|
+
|
|
193
|
+
```text
|
|
194
|
+
source: get_knowledge_detail
|
|
195
|
+
items:
|
|
196
|
+
- id=51, keys=Beijing Second-hand Housing 10-year Transaction Data, value={"desc": "If no time is explicitly specified in the question, use yesterday"}, type=TEXT
|
|
197
|
+
- id=52, keys=Beijing Second-hand Housing 10-year Transaction Data 2, value={"desc":"The answer must include a time range"}, type=TEXT
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### Contains Execution Process
|
|
201
|
+
|
|
202
|
+
When the text contains `Executing metric calculation:` or similar text, it represents metric execution logs.
|
|
203
|
+
|
|
204
|
+
Display recommendation: Show in developer-facing debugging interfaces; hide from business users.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### notify — Progress Notification
|
|
209
|
+
|
|
210
|
+
Messages such as "Thinking next step" or "Searching knowledge base".
|
|
211
|
+
|
|
212
|
+
Display recommendation: Can be used to show status text in a loading animation, or ignored entirely.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### error — Error
|
|
217
|
+
|
|
218
|
+
An exception occurred during analysis.
|
|
219
|
+
|
|
220
|
+
Display recommendation: Show the error message to the user and suggest retrying or rephrasing the question.
|
|
221
|
+
|
|
222
|
+
## Recommended Display Priority
|
|
223
|
+
|
|
224
|
+
If you only need to show core results to end users, filter and display in the following order:
|
|
225
|
+
|
|
226
|
+
1. **summary** — Primary display content
|
|
227
|
+
2. **echarts_plus** — Paired with chart rendering
|
|
228
|
+
3. **code** — SQL view (collapsible)
|
|
229
|
+
4. **metric** — Metric details (collapsible)
|
|
230
|
+
5. **message (knowledge type)** — Referenced knowledge (collapsible)
|
|
231
|
+
|
|
232
|
+
Other types need not be shown to end users.
|
|
233
|
+
|
|
234
|
+
## Real Complete Output Example
|
|
235
|
+
|
|
236
|
+
The following is the key returned messages from a real Q&A session ("Beijing second-hand housing sales over the past 6 years, by district"):
|
|
237
|
+
|
|
238
|
+
```text
|
|
239
|
+
[response#61] type=knowledge
|
|
240
|
+
Knowledge retrieval: consulted 2 business rules
|
|
241
|
+
- Rule 1: If no time is explicitly specified in the question, use yesterday
|
|
242
|
+
- Rule 2: The answer must include a time range
|
|
243
|
+
|
|
244
|
+
[response#93] type=execution log
|
|
245
|
+
Executing metric calculation: Total transaction amount by district in the past 6 years (Metric ID: 631)
|
|
246
|
+
|
|
247
|
+
[response#95] type=metric
|
|
248
|
+
Metric result: Total transaction amount by district in the past 6 years
|
|
249
|
+
Contains metricDsl and physicalMetricDsl
|
|
250
|
+
|
|
251
|
+
[response#99] type=code
|
|
252
|
+
SQL: SELECT region AS district, SUM(transaction_price) AS total_transaction_amount FROM ... GROUP BY region
|
|
253
|
+
|
|
254
|
+
[response#101] type=summary
|
|
255
|
+
Complete analysis summary including district ranking table and key findings
|
|
256
|
+
|
|
257
|
+
[response#103] type=finish
|
|
258
|
+
Analysis complete
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Next Steps
|
|
262
|
+
|
|
263
|
+
- Return to [API Overview](open-api-overview) to view the interface list
|
|
264
|
+
- View the complete parameter definitions for [SafeQuestionPoll](open-api-safe-question-poll)
|