<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Smartchart开发手册</title>
    <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/</link>
    <description>Recent content on Smartchart开发手册</description>
    <generator>Hugo -- gohugo.io</generator><atom:link href="https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/APIDataset/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/APIDataset/</guid>
      <description>Introduction # API datasets allow SmartChart to directly send HTTP requests to external interfaces and obtain JSON data as dataset content. Write a dataset = {...} object in the dataset editor to describe the request method, URL, and parameters. Supports GET/POST and parameter linkage.
API Requirements # The interface must return JSON format
Data Source Configuration # You can choose any data connection
Usage # Simple GET and POST examples:</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/PythonDataset/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/PythonDataset/</guid>
      <description>Introduction # Python datasets (also called &amp;ldquo;universal datasets&amp;rdquo;) allow writing Python code directly in the dataset editor, breaking through SQL query limitations. Enables: cross-data-source joins, Excel reading/processing, API data fetching and storage, calling LLM APIs, and other complex scenarios. The result must be assigned to the ds variable.
Python datasets require a super admin to create a Python connector. Dataset developers can use it directly.
Built-in Functions # Function Description ds_sql(conn_name, sql) Get dataset via connection name and SQL ds_df(ds) Convert ds dataset to Pandas DataFrame ds_list(df) Convert DataFrame back to ds dataset ds_save(config, content, update=0) Write data to database ds_gpt(conn_name, prompt, .</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/RedisSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/RedisSource/</guid>
      <description>Introduction # SmartChart supports Redis as a data source, reading data directly by key name. Ideal for displaying real-time metrics computed by external systems (Spark, crawlers) and written to Redis. Supports JSON objects (dicts) and JSON 2D arrays (tables).
Use Cases # Display data computed by external programs in real-time, such as Spark-computed data or crawler-scraped data, stored in Redis or NoSQL databases.
Usage # Create a Redis connection pool, then create datasets normally.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/DuckdbSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/DuckdbSource/</guid>
      <description>Introduction # SmartChart supports DuckDB as a data source. DuckDB is an in-process analytical database designed for fast OLAP queries. It supports reading CSV, Excel, Parquet files directly, and can query across multiple databases without data movement.
Use Cases # Analytical queries on CSV/Excel/Parquet files without importing into a database Cross-database joins without ETL Fast aggregation queries on large datasets Usage # Create a DuckDB connection pool, then write SQL queries in the dataset editor.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/ElasticsearchSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/ElasticsearchSource/</guid>
      <description>Introduction # SmartChart supports Elasticsearch as a data source. Write ES query DSL (JSON format body) in the dataset editor to query ES index data for visualization. Supports match, term, terms, multi_match, bool, and other query types.
Query Methods # Fuzzy Query (match) # body = { &amp;#39;query&amp;#39;: { &amp;#39;match&amp;#39;: { &amp;#39;name&amp;#39;: &amp;#39;John&amp;#39; } }, &amp;#39;size&amp;#39;: 20 # Default 10, max 10000 } Exact Single Value (term) # body = { &amp;#39;query&amp;#39;: { &amp;#39;term&amp;#39;: { &amp;#39;field1.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/JDBCSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/JDBCSource/</guid>
      <description>Introduction # When the Python environment doesn&amp;rsquo;t have a directly available database connection library, you can connect via JDBC (Java Database Connectivity). SmartChart supports uploading JDBC JAR packages in the dashboard template to extend data source connection capabilities.
Step Operation 1. Install JayDeBeApi pip install JayDeBeApi 2. Upload JAR Upload JDBC JAR in dashboard template editor 3. Create connection Driver format: jdbc:xxx://host:port/db Use Cases # When you cannot find a Python connection library for a database, you can use JDBC as an alternative.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/KafkaSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/KafkaSource/</guid>
      <description>Introduction # SmartChart supports Kafka as a data source for real-time scenarios, retrieving the latest message from a specified partition. Uses custom data source functions to consume the latest record from a Kafka Topic.
Key Concept Description dataset() Returns query dataset, reads latest Kafka record insert_dataset() Data submission implementation, writes messages to Kafka Consumer config Uses KafkaConsumer with SASL authentication Partition Configured via config[&#39;db&#39;] Usage # Refer to &amp;ldquo;Custom Data Source&amp;rdquo; for usage.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/MongoDBSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/MongoDBSource/</guid>
      <description>Introduction # SmartChart supports MongoDB as a data source, reading data from MongoDB collections via JSON format query configuration. Since MongoDB returns dict format, you typically need to use ds_mapToList() in the chart to convert to SmartChart standard 2D array format.
Usage # Configure the connection pool normally. In the dataset editor, write query configuration:
{&amp;#34;db&amp;#34;: &amp;#34;db1&amp;#34;, &amp;#34;table&amp;#34;: &amp;#34;tb1&amp;#34;, &amp;#34;filter&amp;#34;: {&amp;#34;name&amp;#34;: &amp;#34;Zarten&amp;#34;}, &amp;#34;projection&amp;#34;: {&amp;#34;_id&amp;#34;: 0}, &amp;#34;sort&amp;#34;: [[&amp;#34;_id&amp;#34;, 1]], &amp;#34;limit&amp;#34;: 10} Since the return is dict format, convert to 2D array using:</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/PrometheusSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/PrometheusSource/</guid>
      <description>Introduction # SmartChart supports Prometheus as a data source for retrieving and visualizing monitoring metrics. Query Prometheus metrics using PromQL and transform results for visualization.
Use Cases # Display infrastructure monitoring metrics (CPU, memory, disk) Application performance monitoring Custom business metrics tracking Usage # Create a Prometheus connection with the server URL, then write PromQL queries in the dataset editor.
# CPU usage 100 - (avg by (instance) (irate(node_cpu{mode=&amp;#34;idle&amp;#34;}[5m])) * 100) # Memory usage node_memory_MemTotal - node_memory_MemAvailable # HTTP request rate rate(http_requests_total[5m]) Ensure the Prometheus server is accessible from the SmartChart server.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/SQLAlchemySource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/SQLAlchemySource/</guid>
      <description> Introduction # SmartChart supports SQLAlchemy as a universal database connection method. SQLAlchemy provides ORM-level access to various databases including MySQL, PostgreSQL, SQL Server, Oracle, SQLite, and more through a unified interface.
Supported Databases # Database Driver Example MySQL mysql+pymysql://user:pass@host:3306/db PostgreSQL postgresql://user:pass@host:5432/db SQL Server mssql+pyodbc://user:pass@host/db Oracle oracle://user:pass@host:1521/db SQLite sqlite:///path/to/db.sqlite Usage # Create a connection pool with the SQLAlchemy driver URL, then write SQL queries normally in the dataset editor.
Use Cases # When the standard SmartChart driver doesn&amp;rsquo;t support your database When you need ORM-level database access For databases that only have Python SQLAlchemy drivers available </description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/WebSocketSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/WebSocketSource/</guid>
      <description>Introduction # SmartChart supports WebSocket as a data source for real-time data push scenarios. Unlike HTTP polling, WebSocket provides server-push based real-time updates, ideal for live dashboards and monitoring screens.
Use Cases # Real-time stock market data display IoT device status monitoring Live sports/event data updates Real-time production line metrics Usage # Uses custom data source functions. Create a WebSocket connection that receives pushed data and returns it for visualization.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/ExcelData/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/ExcelData/</guid>
      <description>Introduction # SmartChart supports using Excel data as a data source. You can create fixed datasets from Excel data or upload Excel files for processing. This is useful when you need to use Excel data without importing it into a database.
Use Cases # Display Excel data directly in dashboards Use Excel as a temporary data source Process uploaded Excel files Method 1: Fixed Dataset # Create a fixed dataset with Excel data directly in the dataset editor:</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/OtherSources/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/OtherSources/</guid>
      <description>Introduction # SmartChart supports various other data sources through custom connectors, including HTTP API, Webhook, GraphQL, SMS, Telegram, Slack, MQTT, and Anthropic Claude.
Supported Sources # Source Description HTTP API Generic RESTful API calls with authentication and response parsing Webhook Generic webhook push with HMAC signature support GraphQL Query and mutation support for GraphQL endpoints SMS Alipay and Tencent Cloud SMS services Telegram Bot messaging with multiple parse modes Slack Incoming webhook and chat.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/VectorDatabase/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/VectorDatabase/</guid>
      <description>Introduction # Vector database is used for storing and retrieving text embeddings, supporting semantic similarity-based knowledge base Q&amp;amp;A scenarios. SmartChart uses StarRocks as the vector compute backend, combined with custom data source functions, to implement the full vector ingestion and retrieval pipeline. Enterprise vector solution requires Pro edition.
Core Component Description SmartVectorDB Vector database operations class, supports incremental and full-text retrieval Text2VecEmbeddingFunction Local model text-to-vector Text2VecDashscopeFunction Alibaba Dashscope cloud text-to-vector insert_dataset() Batch ingest documents and vectors dataset() Retrieve most similar results by query text Setup # Create the vector table in StarRocks:</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/MessagePushSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/MessagePushSource/</guid>
      <description>Introduction # SmartChart supports message push data sources for sending notifications to DingTalk, WeChat Work, and Feishu. This enables automated alerts, scheduled task notifications, and report delivery through enterprise messaging platforms.
Supported Platforms # Platform Message Types DingTalk Text, markdown, action card, link WeChat Work Text, markdown, image, news Feishu Text, rich text, interactive cards Usage # Create a connection with the webhook URL, then send messages via dataset:</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/BailianAgent/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/BailianAgent/</guid>
      <description>Introduction # Alibaba Bailian LLM knowledge base application supports integration with SmartChart via API, enabling LLM-based knowledge Q&amp;amp;A and intelligent analysis. After configuring a Bailian data source in SmartChart, you can directly input dialogue content in the dataset and get answers from the LLM.
Config Item Description Driver bailianApp Username Bailian agent application App ID Password API_KEY Usage Input dialogue content directly in dataset SQL editor Use Cases # Alibaba Bailian LLM knowledge base application integration</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/CustomSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/CustomSource/</guid>
      <description>Introduction # SmartChart supports custom data sources, allowing you to write Python connector modules for any data source. Create reusable connectors with dataset() and insert_dataset() functions that can be used like built-in data sources.
Development Pattern # Function Purpose dataset(*args, **kwargs) Returns query dataset (2D array or JSON dict) insert_dataset(*args, **kwargs) Data submission/write implementation Function Parameters # def dataset(*args, **kwargs): # args[0]: sqlList - Dataset editor input split by semicolons [sql1, sql2.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/EmailSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/EmailSource/</guid>
      <description>Introduction # SmartChart supports SMTP-based email sending as a data source. Send HTML or plain text emails through configured SMTP servers, useful for scheduled report delivery and alert notifications.
Use Cases # Scheduled report auto-sending Exception alert email notifications Data submission result notifications Configuration # Driver: smtp Connection address: smtp server address (e.g., smtp.qq.com) Port: 465 (SSL) or 587 (TLS) Username: email account Password: email password or authorization code Usage # Write email content in the dataset editor:</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/DingTalkBotSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/DingTalkBotSource/</guid>
      <description>Introduction # SmartChart supports wrapping DingTalk group robot Webhook as a data source, sending text, markdown, and other message types to specified DingTalk groups. Suitable for scheduled task notifications, exception alert pushing, and daily report auto-sending.
Get Webhook URL (3 simple steps) # Open DingTalk → find a group you use Click &amp;hellip; in top right → select Smart Group Assistant Click Add Robot → select Custom Important: Security setting must select &amp;ldquo;Custom Keywords&amp;rdquo;, then enter a word like &amp;ldquo;Alert&amp;rdquo; or &amp;ldquo;Activity&amp;rdquo; After creation, you&amp;rsquo;ll see: Webhook URL: https://oapi.</description>
    </item>
    
    <item>
      <title></title>
      <link>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/FeishuSheetSource/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://help.smartchart.cn/en/docs/2.Datasets/SpecialSources/FeishuSheetSource/</guid>
      <description>Introduction # SmartChart supports reading and writing Feishu (Lark) spreadsheet data as a data source. Access Feishu sheet data through the Feishu Open API, enabling data synchronization between SmartChart and Feishu.
Configuration # Driver: feishu_sheet Connection address: https://open.feishu.cn Username: App ID Password: App Secret Usage # Write query configuration in the dataset editor:
def dataset(*args, **kwargs): sqlList = args[0] config = args[1] # Get tenant access token import requests token_url = f&amp;#34;{config[&amp;#39;host&amp;#39;]}/open-apis/auth/v3/tenant_access_token/internal&amp;#34; token_resp = requests.</description>
    </item>
    
  </channel>
</rss>
