Skip to content

新增 SQLite/Hive 数据源与 Hive 查询修复;修复带别名列名时图表表格不显示#1083

Open
greatyao wants to merge 5 commits intodataease:mainfrom
greatyao:main
Open

新增 SQLite/Hive 数据源与 Hive 查询修复;修复带别名列名时图表表格不显示#1083
greatyao wants to merge 5 commits intodataease:mainfrom
greatyao:main

Conversation

@greatyao
Copy link
Copy Markdown

@greatyao greatyao commented May 3, 2026

引入 SQLite、Hive 数据源与相关模板、表单与样例数据,并补 MySQL/Doris SSL 等能力。后续提交聚焦 Hive 在真实环境下的稳定性,以及 查询结果列名带表/子查询前缀时与图表 columns.value 不一致 的问题。

数据源:SQLite(文件路径类连接)、Hive;模板 SQLite.yaml / Hive.yaml;DatasourceForm、ds-type 与 Hive/SQLite 图标(含后续 PNG 更新)。
Hive 运行时:标识符与元数据/执行路径(db.py 等)、依赖(pyproject)。
图表/会话数据:对结果行中 alias.column 形式增加与 裸列名 对齐的键,保证表格/图表绑定正常;历史记录与即时查询路径均覆盖。
i18n:数据源表单 文件路径 多语言。

yym and others added 5 commits May 3, 2026 09:10
- Add SQLite support to data sources (file-based connection)
- Add Hive support to data sources
- Add SSL toggle option for MySQL and Doris databases
- Add sample data (3 rows JSON format) to help AI better understand table schema
- Fix SQLite schema table name issue (empty schema prefix)
- Add SQLite.yaml template for SQL generation
- Add Hive to haveSchema list in frontend

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…paths

Use Hive-compatible identifier handling and template defaults so generated SQL returns real column values, while also fixing table schema parsing and adding required Hive runtime dependencies.

Made-with: Cursor
- Add DataFormat.normalize_qualified_sql_column_keys* so driver keys like
  "_u2.table_name" also expose "table_name", matching chart columns[].value.
- Apply after SQL execution (LLM save path), format_json_list_data (API/history),
  and get_chart_data_ds (live refresh).

Hive prompts: Document explicit table aliases for duplicate column names in JOINs.

Frontend: Add datasource form i18n key "file_path" (en/zh-CN/zh-TW/ko-KR).
Update Hive/SQLite datasource icons. Remove hive from haveSchema list.
…t/table binding

Backend:
- common/utils/data_format.py: normalize_qualified_sql_column_keys helpers
- apps/chat/curd/chat.py: format_json_list_data + get_chart_data_ds
- apps/chat/task/llm.py: persist normalized rows after SQL exec
- templates/sql_examples/Hive.yaml: JOIN / duplicate column alias note

Frontend — assets:
- src/assets/datasource/icon_hive.png
- src/assets/datasource/icon_sqlite.png

Frontend — i18n (datasource.form.file_path):
- src/i18n/en.json
- src/i18n/zh-CN.json
- src/i18n/zh-TW.json
- src/i18n/ko-KR.json

Frontend — datasource types:
- src/views/ds/js/ds-type.ts: haveSchema list (remove hive)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant