This topic describes how to create a Dataphin data source.
Prerequisites
A data source is created in Dataphin.
The Dataphin data source is attached to an application.
Procedure
Log on to the Quick BI console.
Add a data source.
Go to the Create Data Source page. For more information, see Entries for creating a data source.
Select Dataphin.

In the Configure Connection dialog box, configure the parameters.
You can use a JDBC Connection or a Dataphin Service Data Source.
If you set the connection method to JDBC Connection, configure the following parameters.
NoteDataphin provides a switch to disable full table scans. If this switch is enabled and you do not add partition limits, queries fail. To resolve this issue, you can add a filter condition for the partition field or go to the Dataphin console and disable the switch under Coding Specifications.
For more information about how to connect to Dataphin using Java Database Connectivity (JDBC), see Connect to Dataphin using JDBC.
Name
Description
Display Name
The display name of the data source in the data source list.
Enter a valid name. The name cannot contain special characters or have leading or trailing spaces.
Connection Method
JDBC Connection.
Dataphin Domain Name
The JDBC URL of the Dataphin data source. Log on to the Dataphin console and find the public URL in the JDBC URL column on the data source page. Example: xxxxxxxxxxxxxxxxxxxxx.alicloudapi.com
Port
The port number that corresponds to the Dataphin data source.
Project Name/Database
Specifies the default queryable data scope. As needed, enter one of the following items:
To use Dataphin physical tables, enter the English name of a Dataphin project.
To use Dataphin logical tables, enter the English name of a Dataphin data segment. The name must start with LD_.
To use tables from a data source that is managed by Dataphin, enter the encoding of the data source that is configured in Dataphin. The encoding must start with ds_.
After you specify the scope, you can create a dataset from tables in other projects, segments, or data sources using an SQL dataset. In this case, you must specify a prefix for the project, segment, or data source.
Schema
The name of the schema that you want to connect to. This parameter is optional.
If you use Dataphin physical or logical tables, you do not need to specify this parameter.
If the data source type does not support schemas, such as MySQL, you do not need to specify this parameter.
If the data source type supports schemas, such as Oracle, this parameter is optional. If you specify a schema, data is queried from the specified schema. If you do not specify a schema, data is queried from the default schema of the database.
Execution Project
The project used to execute SQL queries. The project and its attached compute engine must have read permissions on the queried tables.
If the specified query scope is a Dataphin project, this parameter is optional. If you leave this parameter empty, the project specified as the default query scope is used.
If the specified query scope is a Dataphin segment, this parameter is required.
If the specified query scope is a Dataphin data source, you do not need to specify this parameter.
Tenant ID
The ID of the tenant for the query.
AccessKey Type
The AccessKey of the Dataphin platform or a personal user that is used to connect to the Dataphin data source.
AccessKey ID
If you set AccessKey Type to Dataphin Platform, enter the AccessKey ID of the Dataphin platform. Contact the Dataphin O&M team to obtain the AccessKey ID.
If you set AccessKey Type to Personal User, enter the AccessKey ID of the Dataphin user. Go to the Personal Center and click AccessKey to obtain the AccessKey ID.
AccessKey Secret
The AccessKey secret that corresponds to the AccessKey ID.
Proxy User
If you use the platform AccessKey, you must establish a connection based on a proxy user to access Dataphin.
Account Type
If you use the platform AccessKey, you must specify the account type. USER_ID: the unique ID within Dataphin. account_name: the username in Dataphin. SOURCE_USER_ID: the user ID from the source system.
Engine Type
MaxCompute, Hive, MySQL, Oracle, and AnalyticDB for PostgreSQL are supported.
SSL
If the destination data source is configured with SSL, you can select SSL to ensure data security.
VPC Data Source
Select VPC Data Source and configure the following parameters.
NoteYou can connect Quick BI to Dataphin through a Virtual Private Cloud (VPC) only when you use an on-premises deployment of Dataphin and an Alibaba Cloud gateway.
If you select VPC Data Source, you must enter the Server Load Balancer (SLB) address in the Database Address field.
Purchaser AccessId: The AccessKey ID of the account that is used to purchase the SLB instance. Make sure the account has the read permissions on the SLB instance. You can log on to the Resource Access Management (RAM) console to obtain the AccessKey ID. For more information, see View the AccessKey information of a RAM user.
Purchaser AccessKey: The AccessKey secret that corresponds to the AccessKey ID. You can log on to the RAM console to obtain the AccessKey secret. For more information, see View the AccessKey information of a RAM user.
Instance ID: The ID of the SLB instance. Log on to the Server Load Balancer console and find the instance ID in the instance list.
Region: The region where the instance is located. Log on to the Server Load Balancer console and find the region in the upper-left corner of the Instances page.
Initialize SQL
After you enable this option, you can configure SQL statements to run after the data source connects.
Only SET statements are allowed. Separate multiple statements with semicolons (;).
If you set the connection method to Dataphin Service Data Source, configure the following parameters.
Name
Description
Display Name
The display name of the data source in the data source list.
Enter a valid name. The name cannot contain special characters or have leading or trailing spaces.
Connection Method
Dataphin service data source.
When you select this option, you must first manually create a data source in Dataphin and configure an AppKey and AppSecret.
Database Address
The JDBC URL of the Dataphin data source. If you use a VPC data source, enter the SLB address.
Log on to the Dataphin console and find the public URL in the JDBC URL column on the data source page. Example:
xxxxxxxxxxxxxxxxxxxxx.alicloudapi.com.Data Source Name
The custom name of the data source in Dataphin.
Log on to the Dataphin console. On the **Dataphin Data Source Service** page under **DataService Studio Overview**, obtain the **Data Source Name**.
Schema
Optional. The name of the schema that you want to connect to.
Schema of a logical table: a business segment in Dataphin.
Schema of a physical table: a project in Dataphin.
AppKey
The AppKey of the application in the Dataphin data source.
Log on to the Dataphin console. On the application page under **Platform Management** > **Application Management**, obtain the **AppKey**.
AppSecret
The AppSecret of the application in the Dataphin data source.
Log on to the Dataphin console. On the application page under **Platform Management** > **Application Management**, obtain the **AppSecret**.
Engine Type
MaxCompute and Hive are supported.
VPC Data Source
Select this option to configure a VPC data source.
NoteYou can connect Quick BI to Dataphin through a VPC only when you use an on-premises deployment of Dataphin and an Alibaba Cloud gateway. Select VPC Data Source and configure the following parameters. If you select VPC Data Source, you must enter the SLB address in the Database Address field.
Creator AccessId
Log on to the RAM console to obtain the AccessKey ID. For more information, see View the AccessKey information of a RAM user.
Creator AccessKey
Log on to the RAM console to obtain the AccessKey secret. For more information, see View the AccessKey information of a RAM user.
API Gateway Group ID
Log on to the API Gateway console.
In the navigation pane on the left, choose Open API > Groups. On the Groups page, you can find the group ID.
Region
The region where the API group is located. You can find the region on the Groups page in the API Gateway console.
ImportantWhen you connect to a public cloud Dataphin instance, you can connect only over the internet.
When you connect to an on-premises Dataphin instance:
If the Dataphin gateway is a private gateway (including Lingyang), you can connect only over the internet.
If the Dataphin gateway is an Alibaba Cloud gateway, you can connect over the internet or through a VPC.
Click Test Connection to test the data source connection.

After the connection is successfully tested, click OK to add the data source.
What to do next
After you create a data source, you can create datasets and analyze data.
To create a dataset from data tables or custom SQL statements in the Dataphin data source, see Create a dataset.
To create charts for data visualization and analysis, see Create a dashboard and Overview of charts.
To drill down into data for in-depth analysis, see Step 3: Configure and view drill-down data.