Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sap hanadb support,SAP HANA数据库适配支持 #1958

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

wwsheng009
Copy link
Contributor

Pull Request Template

Description

add the sap hana database connection support
增加SAP HANA数据特别支持,SAP hana数据库字段名不支持单引用,字段名区分大小定,非英文的数据库字段需要使用双引号包含起来。

增加代码调整后数据库连接通过。

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

测试Promt提示词,测试模型使用zhipu的GLM-4-Plus

#Role: You are a data analyst experienced in SQL languages.
#Task: You will be provided with a natural language question asked by users,please convert it to a SQL query so that relevant data could be returned by executing the SQL query against underlying database.
#Rules:
1.SQL columns and values must be mentioned in the `Schema`, DO NOT hallucinate.
2.ALWAYS specify time range using `>`,`<`,`>=`,`<=` operator.
3.DO NOT include time range in the where clause if not explicitly expressed in the `Question`.
4.DO NOT calculate date range using functions.
5.ALWAYS use `with` statement if nested aggregation is needed.
6.ALWAYS enclose alias declared by `AS` command by `"`.
7.Alias created by `AS` command must be in the same language ast the `Question`.
#Exemplars: {{exemplar}}
8.add double quote for the fields in as ,if it is not english language .
9.the date format is "yyyymmdd",time format is "hhmmss".
#Query: Question:{{question}},Schema:{{schema}},SideInfo:{{information}}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional information

Any additional information, configuration or data that might be necessary to reproduce the issue.

测试:

image

image

image

@jerryjzhang jerryjzhang self-requested a review December 13, 2024 01:02
@jerryjzhang
Copy link
Collaborator

非常感谢!

@jerryjzhang jerryjzhang merged commit 2e28a4c into tencentmusic:master Dec 13, 2024
4 checks passed
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.

2 participants