Baidu AI Cloud
中国站

百度智能云

Data Visualization-Sugar

Database

Supported data source types

Data source in Sugar refers to database connection. Each space can establish multiple data sources. Currently, the supported data source types are as follows, red font indicates that Sugar supports data model to connect to this data source. Other black font representations can only use SQL at present Modeling way to connect, we are developing rapidly, will continue to support various databases in data model way.

  • Excel/CSV
  • Database

    • MySQL
    • MariaDB
    • SQL Server
    • Oracle
    • PostgreSQL
    • GreenPlum
    • CockroachDB
    • IBM DB2
    • SAP Hana
    • SyBase ASE
    • GBase
    • Exasol
  • big data

    • Apache Kylin
    • Apache Hive
    • Apache Spark
    • Apache Impala
    • Apache Druid
    • Apache Doris(Palo)
    • Presto
    • Vertica
    • Clickhouse
    • Snowflake
    • Teradata
    • BLS
  • Temporal database

  • Other NoSQL

    • Cassandra
    • Redis
    • MongoDB
    • ElasticSearch

Add data source

The space administrator can enter the data source management through the management center in the left side bar of the space. When adding a data source, select the type of data source and provide the necessary information (host, user name, password, etc.) to connect to the database. If your database has an IP white list restriction policy, you need to add Sugar's IP to your database permission IP white list.

Generally, for the database account you fill in on Sugar, it is recommended that you only give the data read permission to the account. Note: ·sing Sugar's online SaaS version, the data source host you enter must be a public address. If your database cannot be accessed through the public network, you can also consider private deployment or intranet tunnel.

picture

After filling in the information, the user can test the database connection and save the data source. Of course, you can also modify or delete existing data sources.

Database authorization

When you add a database connection to Sugar, you need to allow the database to access the Sugar back-end machine so that Sugar can connect to your database, so you need your database to authorize Sugar. If your database supports CIDR, you can authorize this IP (as shown in part 3 above): 14.215.188.0/25 and 111.45.0.0/22. If CIDR is not supported, you need to authorize all the following IPS:

14.215.188.4
14.215.188.5
14.215.188.6
14.215.188.7
14.215.188.8
14.215.188.9
14.215.188.10
14.215.188.11
14.215.188.12
14.215.188.13
14.215.188.14
14.215.188.15
14.215.188.16
14.215.188.17
14.215.188.18
14.215.188.19
14.215.188.68
14.215.188.69
14.215.188.70
14.215.188.71
14.215.188.72
14.215.188.73
14.215.188.74
14.215.188.75
14.215.188.76
14.215.188.77
14.215.188.78
14.215.188.79
14.215.188.80
14.215.188.81
14.215.188.82
14.215.188.83
111.45.1.9
111.45.1.137
111.45.1.201
111.45.2.9
111.45.2.137
111.45.2.201
111.45.1.73
111.45.2.73

The above is the database authorization required when using Sugar's SaaS version on the cloud. If you use the private deployment version, you need to adjust it according to your deployed machine.

Generally, databases are either database services provided by cloud vendors or self built databases. IP authorization references for these two types of databases are as follows:

Cloud database authorization

If your database is a service provided by a cloud manufacturer, the authorization operation of such a database is relatively simple. Generally, the cloud manufacturer has a "security" related authorization page, such as cloud's:

picture

Authorization of self built database

If you are a self built database, please see:

  • If you are a self built database on the ECS, the ECS generally has settings related to "security group". You need to configure the IP address of Sugar in the previous section in the entry and exit of the security group
  • TCP / IP remote access should be enabled for the database. For example, SQL server and MySQL are not enabled by default
  • For SQL server, you should allow the account password to log in, not just the default Windows authentication
  • Turn off the firewall of the system
  • Authorization management of the database itself (SQL server does not have this mechanism), for example, mysql, please see
Grant all privileges on *. * to 'user name' @ 'specific IP' identified by 'password';
FLUSH PRIVILEGES;
  • If the authorization is confirmed to be OK, and the connection failure is always prompted, Please confirm whether the information filled in is correct, and it has been found that there are multiple user input errors (wrong password, wrong database name, etc.)

Preview / edit

For the existing data source, you can preview the data table, as shown in the following figure:

picture

In addition, for MySQL, SQL server, Oracle and Postgres data sources, the ability to add, delete, modify and query are also available, as shown in the following figure:

picture

It should be noted that if you want to use the edit and delete functions, you need to ensure that this account has the corresponding permissions when adding a data source. If you do not want to use this function, you can use a read-only account when adding a data source so that data cannot be edited in Sugar.

Edit data

Click the small icon on the right of a data content in the query result to modify the data:

picture

You can modify multiple data at the same time, and then click submit:

picture

Find data

Click the "filter" button to expand the input box of search data:

picture

In addition, for query data results, you can click the button on each column heading to sort

picture

Add data

Click the "add" button to add data.

picture