Parameter Name | Description |
Name | Used as the table name in CLS SQL, supports lowercase letters, numbers, and _, cannot start or end with _, length is 3 - 60 characters, and the name must be unique within the region. |
Remarks | Optional, no more than 255 characters. |
Data Source Type | TencentDB for MySQL or TDSQL-C for MySQL. |
Region | Select the region where the TencentDB instance is located. |
MySQL Instance | Select the TencentDB instance. |
Account name | Username for accessing MySQL. |
Password | Password for accessing MySQL. |
Database Name | Name of the MySQL database to be associated. |
Table Name | Name of the table in the MySQL database to be associated. |
Applicable Scope | Only the current log topic is accessible: Only the current log topic can access the MySQL data via SQL. Log topics within the current logset are accessible: All log topics within the logset to which the current log topic belongs can access the MySQL data via SQL. |
Parameter Name | Description |
Name | Used as the table name in CLS SQL, supports lowercase letters, numbers, and _, cannot start or end with _, length is 3 to 60 characters, and the name must be unique within the region. |
Remarks | Optional, no more than 255 characters. |
Data Source Type | COS (CSV files). |
Bucket Region | Select the region of the COS file. |
COS Bucket | Select the bucket of the COS file. |
File name | Enter the COS file name. |
Compression mode | Only No Compression is supported for now. |
Parameter Name | Description |
Field Type | Supports text, long, and double. Select based on the actual data type. |
Access Scope | Only the current log topic is accessible: Only the current log topic can access the MySQL data via SQL. Log topics within the current logset are accessible: All log topics within the logset to which the current log topic belongs can access the MySQL data via SQL. |
Parameter Name | Description |
Name | Used as the table name in CLS SQL, supports lowercase letters, numbers, and _, cannot start or end with _, length is 3 - 60 characters, and the name must be unique within the region. |
Remarks | Optional, no more than 255 characters. |
Data Source Type | Self-built MySQL |
Access mode | Private network address or public network address |
Region | Required when a private network address is used. Select the region where the MySQL instance is located. |
Network | Required when a private network address is used. Select the VPC where the MySQL instance is located. |
Network service type | Required when a private network address is used: If your MySQL needs to be accessed via CLB, select CLB. If your MySQL server allows direct access, select CVM. |
Access Address | For example, gz-cdb-xxxxx.sql.tencentcdb.com |
MySQL Port | Database port, for example, 3306 |
Account name | Username for accessing MySQL. |
Password | Password for accessing MySQL. |
Database Name | Name of the MySQL database to be associated. |
Table Name | Name of the table in the MySQL database to be associated. |
Applicable Scope | Only the current log topic is accessible: Only the current log topic can access the MySQL data via SQL. Log topics within the current logset are accessible: All log topics within the logset to which the current log topic belongs can access the MySQL data via SQL. |
* | select * from log. The from log clause can be omitted, resulting in * | select *. When both log data and external data are queried, it is recommended that you do not omit the clause to improve SQL readability.userinfo, the corresponding SQL is * | select * from userinfo.* | select * from log left join userinfo on log.user_id=userinfo.id
| and the time range specified for this query do not apply to the external data. They only apply to the log data in the current log topic."status_code": "404""local_time": "2023-06-05 19:59:01""refer": "_","user_id": "15""ip": "66.131.53.125""url": "\\"GET /class/111.html HTTP/1.1\\""
id | Name | Gender | Age | Email | Phone | Address |
1 | John Doe | Male | 32 | johndoe@example.com | 1234567890 | 123 Main St |
2 | Jane Smith | Female | 28 | janesmith@example.com | 9876543210 | 456 Elm St |
3 | Michael Johnson | Male | 45 | michaeljohnson@example.com | 5551234567 | 789 Oak St |
4 | Sarah Davis | Female | 38 | sarahdavis@example.com | 7894561230 | 321 Pine St |
5 | David Wilson | Male | 51 | davidwilson@example.com | 1237894560 | 654 Maple St |
6 | Emily Anderson | Female | 29 | emilyanderson@example.com | 4567890123 | 987 Cherry St |
7 | Matthew Thompson | Male | 37 | matthewthompson@example.com | 7890123456 | 321 Plum St |
8 | Olivia Martinez | Female | 26 | oliviamartinez@example.com | 2345678901 | 654 Orange St |
9 | Alexander Taylor | Male | 42 | alexandertaylor@example.com | 9012345678 | 987 Grape St |
10 | Emma Clark | Female | 31 | emmaclark@example.com | 3456789012 | 123 Lemon St |
user_id in the log to the user's gender Gender:* | select ip,url,user_id,Name,Gender from log left join userinfo on log.user_id=userinfo.id

* | select count(*) as pv,Gender from (select ip,url,user_id,Name,Gender from log left join userinfo on log.user_id=userinfo.id) group by Gender

Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback