Data Source

更新时间:
复制 MD 格式

A data source is a database that stores the data for the objects you want to analyze. Quick Audience supports three types of ApsaraDB databases: AnalyticDB for MySQL 2.0 (ADB 2.0), AnalyticDB for MySQL 3.0 (ADB 3.0), and AnalyticDB for PostgreSQL (ADB PG).

Data sources are divided into the following types based on their scope:

  • Organization data source: An organization administrator adds this data source to an organization. Before a workspace can use the data source, the organization administrator must grant permissions to the workspace. For more information, see Authorize data source tables.

  • Workspace data source: A workspace administrator or organization administrator adds this data source to a workspace. No authorization is required.

The following sections describe how to add each of the three types of data sources as a workspace data source.

Note

  • After you co-purchase ADB 3.0 and grant the required authorization, the corresponding ADB 3.0 database is automatically added to the organization data source list.

  • After you purchase the Social Interaction feature package, you must add an ADB 3.0 or ADB PG data source. ADB 2.0 data sources do not support writing back data from the Social Interaction module.

AnalyticDB for MySQL 2.0

Add ADB 2.0:

  1. Go to Workspace > Configuration Management > Data Center > Data Source, and click New Data Source.

  2. In the dialog box that appears, select AnalyticDB for MySQL 2.0.

  3. Configure the parameters as described in the following table.

    Parameter

    Description

    Display Name

    Enter a display name for the data source. For example: XX_purpose_ADB2.0.

    Database Address

    Enter the public endpoint of the data source.

    Port

    Enter the public port number.

    Database

    Enter the name of the database to connect to.

    AccessKey ID

    Enter the AccessKey ID of the Alibaba Cloud account that has permissions on the ADB 2.0 instance.

    Grant permissions to an Alibaba Cloud account or a RAM user. The permissions must include all permission types except Grant. Then, obtain the AccessKey information for the account. For more information, see ADB 2.0 permission management.

    AccessKey Secret

    Enter the AccessKey secret for the Alibaba Cloud account.

  4. Click Test Connection to test the data source connection.

    If the test fails, a message appears. Modify the configuration.

  5. After the connection test is successful, click Add to complete the configuration.

AnalyticDB for MySQL 3.0

To add an ADB 3.0 data source:

  1. Go to Workspace > Configuration Management > Data Center > Data Source, and click New Data Source.

  2. In the dialog box that appears, select AnalyticDB for MySQL 3.0.

  3. Configure the parameters as described in the following table.

    Parameter

    Description

    Display Name

    Enter a display name for the data source. For example: XX_purpose_ADB3.0.

    Region

    Select the region where the data source is located.

    Database Address

    Enter the public endpoint of the data source.

    Port

    Enter the public port number.

    Database

    Enter the name of the database to connect to.

    Account

    Enter the database user account.

    This can be a privileged account or a standard account. A standard account must be granted all operation permissions on the database. For more information, see ADB 3.0 database accounts.

    Password

    Enter the database user password.

  4. Log on to the AnalyticDB console. Add the Quick Audience IP address, which is provided on the page, to the whitelist. This step allows Quick Audience to access the data source cluster. For more information, see Whitelist.

  5. Click Test Connection to test the data source connection.

    If the test fails, a message appears. Modify the configuration.

  6. After the connection test is successful, click Add to complete the configuration.

AnalyticDB for PostgreSQL

To add an ADB PG data source:

  1. Go to Workspace > Configuration Management > Data Center > Data Source, and click New Data Source.

  2. In the dialog box that appears, select AnalyticDB for PostgreSQL.

  3. Configure the parameters as described in the following table.

  4. Parameter

    Description

    Display name

    Enter a display name for the data source. For example, XX_purpose_PG.

    Region

    Select the region where the data source is located.

    Database address

    Enter the public endpoint of the data source.

    Port

    Enter the public port number.

    Database

    Enter the name of the database to connect to.

    Schema

    Enter the schema of the database. The default value is public.

    Account

    Enter the database user account.

    The account can be a privileged account or a standard account. However, a standard account must be granted all operation permissions on the database. For more information, see ADB for PostgreSQL database accounts.

    Password

    Enter the password for the database user.

  5. Click Test Connection to test the data source connection.

    If the test fails, a message appears. Modify the configuration.

  6. After the connection test is successful, click Add to complete the configuration.

Manage the Data Source

After you create a data source, you can manage it from the data source list, as shown in the following figure. The navigation pane on the left displays the data source list. The right side of the page displays the tables in the selected data source.

image.png

Note
  • The 1 icon indicates ADB 2.0 and ADB 3.0. The 3 icon indicates ADB PG.

  • Organization data sources that are authorized for the workspace are also displayed in the list. The 4 icon appears next to the data source name to distinguish them from workspace data sources. However, the workspace may have permissions on only some of the tables, fields, or rows, depending on the granted authorization.

Edit a workspace data source

Hover over a workspace data source and click the 11 icon that appears to edit the data source. The configuration method is the same as when you created the data source.

Remove a workspace data source

Note

If a dataset is based on the data source, you cannot delete the data source. You must first delete the dataset. For more information about deleting datasets, see Manage Datasets.

Hover over a workspace data source and click the 22 icon that appears. Confirm the operation to remove the data source.

View table details

  1. Click a data source name. The tables in the data source are displayed on the right side of the page.

  2. Click the 33 icon. A dialog box appears that shows the field names, field types, and descriptions for the table, as shown in the following figure.3754

Create a dataset from a table

  1. Click a data source name. The tables in the data source are displayed on the right side of the page.image.png

  2. Click the 44 icon and select the type of dataset to create. For more information, see Create a dataset.