tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

SELECT Overview

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-03-26 11:21:30
The COS Select feature uses Structured Query Language (SQL) statements to filter the objects stored in COS so as to extract specific objects and get desired data. With COS Select, you can reduce the amount of data transferred by COS for lower costs and latency during data extraction.
The COS Select feature currently allows you to extract objects stored in CSV, JSON, and Parquet formats and compressed by gzip or bzip2 (for CSV and JSON objects only). In addition, you can save extraction results in CSV and JSON formats and specify how to separate the result records.
You can pass in a SQL expression to COS in your request. COS Select currently only supports certain SQL expressions. For more information, see SQL Functions.
You can use the COS console, API, SDK, or COSCMD to perform SQL queries. Note that certain limits apply to file extraction in the COS console: up to 128 MB of files can be extracted, and up to 40 MB of data can be returned. To extract more data, you need to use other methods.
Note:
For more information on data types supported by COS Select and current reserved fields, see Data Types and Reserved Fields.
Currently, the extraction feature is only supported in the Chinese mainland public cloud regions, Jakarta and Virginia (US East), and is not available in other regions.

Restrictions

The following restrictions apply to COS Select:
You must have the cos:GetObject permission to the queried object. A root account has this permission by default.
Only objects in the STANDARD storage class can be extracted.
The maximum length of a SQL expression is 256 KB.
The maximum length of a single record in the extraction result is 1 MB.
SQL clauses currently supported by COS Select include:
SELECT statement
FROM clause
WHERE clause
LIMIT clause
Note:
For more information on SQL clauses, see SELECT Command.
Functions currently supported by COS Select include:
Aggregate functions, such as AVG, COUNT, MAX, MIN, and SUM.
Condition functions, such as COALESCE and NULLIF.
Conversion functions, such as CAST.
Date functions, such as DATE_ADD, DATE_DIFF, EXTRACT, TO_STRING, TO_TIMESTAMP, and UTCNOW.
String functions, such as CHAR_LENGTH, CHARACTER_LENGTH, LOWER, SUBSTRING, TRIM, and UPPER.
Note:
For more information on SQL functions, see SQL Functions.
COS Select currently supports the following operators:
Logical operators: AND, NOT, OR
Comparison operators: <, >, <=, >=, =, <>, !=, BETWEEN, IN
Pattern matching operators: LIKE
Mathematical operators: +, -, *, %
Note:
For more information on operators, see Operators.

Initiating Extraction Request

You can initiate an extraction request using the console, API, or SDK:
If you use the console, see Data Extraction.
If you use the API, see SELECT Object Content.
If you use the SDK, go to SDK Overview and select the required SDK API.

FAQs

If a problem occurs when you perform a query, COS Select will return an error code and error message. For the list of error codes and descriptions, see Special Error Codes.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan