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

[doc][datasource-12820] add azure sql database doc #13254

Merged
merged 4 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/configs/docsdev.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ export default {
title: 'Amazon Athena',
link: '/en-us/docs/dev/user_doc/guide/datasource/athena.html',
},
{
title: 'Azure SQL Database',
link: '/en-us/docs/dev/user_doc/guide/datasource/azure-sql.html',
},
],
},
{
Expand Down Expand Up @@ -926,6 +930,10 @@ export default {
title: 'Amazon Athena',
link: '/zh-cn/docs/dev/user_doc/guide/datasource/athena.html',
},
{
title: 'Azure SQL Database',
link: '/zh-cn/docs/dev/user_doc/guide/datasource/azure-sql.html',
},
],
},
{
Expand Down
77 changes: 77 additions & 0 deletions docs/docs/en/guide/datasource/azure-sql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# AZURE SQL

## AUTH Mode

### SqlPassword

![sqlpassword](../../../../img/new_ui/dev/datasource/azuresql-server.png)

Use Azure SQL server username and password to login.

| **Datasource** | **Description** |
|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| Datasource | Select AZURE SQL. |
| Datasource name | Enter the name of the DataSource. |
| Description | Enter a description of the DataSource. |
| IP/Host Name | Enter the AZURE SQL service Host or IP, eg: xxx.database.windows.net. |
| Port | Enter the AZURE SQL service port, 1433 by default. |
| Auth Mode | Set the connection auth mode. Currently support: SqlPassword,ActiveDirectoryPassword,ActiveDirectoryMSI,ActiveDirectoryServicePrincipal,accessToken. |
| Username | Set the username for AZURE SQL connection. |
| Password | Set the password for AZURE SQL connection. |
| Database name | Enter the database name of the AZURE SQL connection. |
| Jdbc connection parameters | Parameter settings for AZURE SQL connection, in JSON format. |

The following only describes the different attributes.

### ActiveDirectoryPassword

![AD](../../../../img/new_ui/dev/datasource/azuresql-ad.png)

Use Azure AD username and password to login.

Prerequisites: set AD account to be the admin of the Azure SQL server.

![admin](../../../../img/new_ui/dev/datasource/azuresql-ad2.png)

- Azure AD username: Azure AD account name, eg: [email protected]
- Password: Azure AD password

### ActiveDirectoryMSI

![msi](../../../../img/new_ui/dev/datasource/azuresql-msi.png)

Use Azure internal services to login.
Prerequisites: set Azure virtual machine to be the admin of the Azure SQL server. MSIClientId should be VM's Application ID and it is not required.

![msi-admin2](../../../../img/new_ui/dev/datasource/azuresql-msi-admin2.png)
![msi-admin1](../../../../img/new_ui/dev/datasource/azuresql-msi-admin1.png)

- MSIClientId: input the clientId of the internal resources (eg: Azure VM, applications or Azure Active Directory application functions) of the ActiveDirectoryMSI mode.

### ActiveDirectoryServicePrincipal

![principal](../../../../img/new_ui/dev/datasource/azuresql-principal.png)

Use application (client) ID and secret to login.
Prerequisites: set application to be the admin of the Azure SQL server. Meanwhile, apply for client secret for the application and use both secret and ID to login.

![principal2](../../../../img/new_ui/dev/datasource/azuresql-principal2.png)

- clientId: application (client) ID
- clientSecret: application client secret

### accessToken

![principal](../../../../img/new_ui/dev/datasource/azuresql-token.png)

Use application (client) ID and secret to apply for temporary token, and use token to login (not JDBC connection).

![principal](../../../../img/new_ui/dev/datasource/azuresql-endpoints.png)

- clientId: application (client) ID
- clientSecret: application client secret
- OAuth 2.0 token endpoint (v2): application OAuth 2.0 token endpoint (v2)

## Support Native

Yes, can use this datasource directly in SQL task.
61 changes: 61 additions & 0 deletions docs/docs/zh/guide/datasource/azure-sql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# AZURE SQL 数据源

## 模式

### SqlPassword

![sqlpassword](../../../../img/new_ui/dev/datasource/azuresql-server.png)

使用数据库服务器的用户名和密码验证。
- 数据源:选择 AZURE SQL
- 数据源名称:输入数据源的名称
- 描述:输入数据源的描述
- IP 主机名:输入连接 AZURE SQL 的 HOST 或 IP ,例如:xxx.database.windows.net
- 端口:输入连接 AZURE SQL 的端口,默认1433
- 验证模式:输入 AZURE SQL 的连接模式,目前支持:SqlPassword,ActiveDirectoryPassword,ActiveDirectoryMSI,ActiveDirectoryServicePrincipal,accessToken.
- 用户名:设置连接 AZURE SQL 的用户名
- 密码:设置连接 AZURE SQL 的密码
- 数据库名:输入连接 AZURE SQL 的数据库名称
- Jdbc 连接参数:用于 AZURE SQL 连接的参数设置,以 JSON 形式填写
以下仅对差异化属性进行说明。

### ActiveDirectoryPassword

![AD](../../../../img/new_ui/dev/datasource/azuresql-ad.png)

采用Azure AD账号名和密码验证。
前置条件:设置AD账号为数据库AD管理员。
![admin](../../../../img/new_ui/dev/datasource/azuresql-ad2.png)
- Azure AD用户名:Azure AD 的账号名,例如:[email protected]
- 密码:Azure AD 的密码

### ActiveDirectoryMSI

![msi](../../../../img/new_ui/dev/datasource/azuresql-msi.png)
采用AZURE内部服务器验证。
前置条件:先设置内部服务器为数据库AD管理员再进行请求,MSIClientId是服务器的id,是不必要的。
![msi-admin2](../../../../img/new_ui/dev/datasource/azuresql-msi-admin2.png)
![msi-admin1](../../../../img/new_ui/dev/datasource/azuresql-msi-admin1.png)
- MSIClientId:选择ActiveDirectoryMSI模式下的内部资源(例如 Azure 虚拟机、应用服务或与 Azure Active Directory 联合的函数应用)的clientId

### ActiveDirectoryServicePrincipal

![principal](../../../../img/new_ui/dev/datasource/azuresql-principal.png)
采用应用的应用程序(客户端) ID和密钥进行验证。
前置条件:先设置应用为数据库AD管理员,同时给应用设置客户端密码,最终使用两者新建数据源。
![principal2](../../../../img/new_ui/dev/datasource/azuresql-principal2.png)
- clientId: ActiveDirectoryServicePrincipal模式下,应用的应用程序(客户端) ID
- clientSecret:ActiveDirectoryServicePrincipal模式下,应用的应用程序客户端密码

### accessToken

![principal](../../../../img/new_ui/dev/datasource/azuresql-token.png)
采用应用的应用程序(客户端) ID和密钥去请求临时token,然后仅采用token进行连接,非jdbc连接。
![principal](../../../../img/new_ui/dev/datasource/azuresql-endpoints.png)
- clientId: accessToken模式下,应用的应用程序(客户端) ID
- clientSecret:accessToken模式下,应用的应用程序客户端密码
- OAuth 2.0 令牌终结点:accessToken模式下,应用的OAuth 2.0 令牌终结点(v2)

## 是否原生支持

是,数据源不需要任务附加操作即可使用。
Binary file added docs/img/new_ui/dev/datasource/azuresql-ad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/new_ui/dev/datasource/azuresql-ad2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/new_ui/dev/datasource/azuresql-msi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.