百度智能云

All Product Document

          Object Storage

          Manage Object

          Upload Object

          BOS supports storage of any type of file. After the bucket is created successfully, you can upload, download, copy, and delete the object in the bucket through the console. BOS file storage supports four types of storage: standard storage, infrequency storage, cold storage, and archive storage. Users can select according to the hot and cold conditions of the data. For how to select, you can refer to How to select the appropriate storage type.

          1. Click "Upload a file" to open the local file selection dialog box.

          image.png

          1. After selecting the file, select the storage type of "Standard storage", "Infrequent Storage", "Cold Storage" or "Archive Storage", and click the "Start Upload" button to upload. You can select multiple files to upload at the same time.

          image.png

          After the uploading is completed, it will be displayed in the "Storage Type" column of the corresponding object.

          Note:

          • The size of a single uploaded file shall not exceed 5GB. In case you need to transfer large files, it is recommended to use SDK tool.
          • BOS does not currently support Version. If the requester repeatedly uploads an object, the previously uploaded data will be covered.

          Download Object

          There are two ways to download object:

          1. In the file list, clicking the file name of the object you want to download. In the pop-up file information drawer, clicking the download button to download files.

          image.png

          1. Clicking the "Copying Link" on the right of the object you want to download and paste the copied download address in a new browser window to download.

          image.png

          Note: The archive type object does not support direct download. You must click the "File Retrieve" button in the file information drawer to retrieve the object before downloading.

          Copy Object

          1.Clicking "More" on the right of the object you want to copy and select "Copy".

          2.After selecting the destination bucket and the destination folder in the pop-up floating layer, clicking "OK".

          Note:

          • Object supports replication across regions.
          • The unretrieved archive type object does not support the copy operation, and must be retrieved before it can operate normally.

          Delete Object

          Clicking "More" on the right of the object you want to delete and select "Delete" to delete the corresponding object.

          image.png

          BOS supports batch deletion of objects or folders. Selecting multiple objects or folders in a bucket and clicking "Delete" above to delete them in batches.

          image.png

          Rename Object

          Clicking "More Actions > Rename" on the right of object to rename object.

          image.png

          Note: objects of archive type do not support rename operations.

          Create Meta of Object

          1.Clicking "More Actions > Set Metadata" on the right of object to set Metadata for object other than the archive type. For a detailed description of Metadata, please refer to Metadata.

          image.png

          Note: Currently the console that can support setting includes Content-Type, Content-Disposition, Cache-Control and custom Meta: x-bce-meta. The detailed description of Metadata is as follows:

          • Content-Type: Content-Type is an important parameter in the HTTP protocol header. It is used to identify the type of data sent or received. The browser determines the opening method of data based on this parameter. Common Content-Types are image/jpeg, text/xml, text/html, application/octet-stream, etc.
          • Content-Disposition: Content-disposition is an extension of the MIME protocol, which is used to instruct the MIME user agent about how to display attached files. For example, Content-disposition can be used to save the content requested by the user as a file: attachment; filename = "image.jpg".
          • Cache-Control: Cache-Control is used to control the caching of web pages. Common values include private, no-cache, max-age, and must-revalidate.
          • x-bce-meta: User-defined meta can be used to save custom information. For example, to save file tags, use "x-bce-meta-tag" for parameters, and "cats" for values.

          Set Object Privileges

          Clicking on the object to be authorized, selecting "Access Privileges" in "File Information" and setting it, to adjust the privileges on the read operation of the object.

          In the object privilege setting, the object privilege is identical to the bucket privilege by default. You can also set the object as a public reading or private privilege as needed. In case of any discrepancy between the object reading privilege and the object privilege, the object privilege will prevail.

          image.png

          Note: Archive type objects do not support setting object privileges.

          Manage Folders

          In order to manage data more conveniently, BOS provides a folder function. Users can create folders in bucket to store object.

          Creating Folder

          1.Clicking "bucket" to enter the file list page, and clicking "Create new folder" to create a new folder as required in the pop-up floating layer.

          image.png

          Deleting Folder

          1.Clicking "Bucket" to enter the file list page, and clicking "Delete" to delete the corresponding folder.

          image.png

          BOS supports batch deletion of objects or folders. Selecting multiple objects or folders in a bucket and clicking "Delete" above to delete them in batches.

          MultiPartUpload

          Part is produced through multipart upload process. Please refer to Object MultipartUpload.

          1.Clicking "MultiPart Management" then the currently completed multipart upload will be listed on the right. Please refer to MultipartUpload.

          Select Scanning

          Overview

          BOS Select scanning feature supports to retrieve and query the contents of a single file of BOS through simple SQL statements, thus accessing the data you want. By virtue of BOS Select scanning feature, you can retrieve and query the file contents on the console, without the need to download the file locally for query, thus saving the bandwidth resources effectively, and improving the efficiency of the data query. Select scanning is a value-added service of BOS, which will incur corresponding costs. Please view the billing overview for more details.

          Notes

          • The file types supporting for retrieval:

            • CSV file: UTF-8 encoded RFC 4180 standard CSV files include the CSV file of TSV and other types, and the row and column delimiter of the file as well as Quote character can be customized;
            • JSON file: It includes two JSON types of DOCUMENT and LINES. Among them, DOCUMENT refers to that the entire file is a single JSON object, while LINES indicates that the entire file consists of multi-row JSON object, but the entire file itself is not a valid JSON object, and the lines are separated by a newline separator;
          • Storage types supporting for retrieval: Files of standard storage, infrequent storage and cold storage;
          • Support to scan the encrypted files on the server;
          • Support to scan the files compressed by means of GZIP;
          • SQL syntax supported: Support for the sentence pattern of Select From Where Limit SQL, and support for the data type of string, int(64bit), float(64bit), timestamp, bool and decimal(128), and support for logic condition (AND, OR, NOT), arithmetic expression (+-*/%), comparison operator (>,=, <, >=, <=, ! =), matching operator (LIKE, BETWEEN+AND, IN), Null judgment (IS NULL), aggregate function (AVG, COUNT, MAX, MIN, SUM), transfer function CAST and alias keywords AS;
          • Currently, the console only supports to scan the files of less than 128MB, and extracts the first 40 MB data of the scanning results. If you need to process larger files or return more records, please call Select Object API interface ;
          • Select scanning is a value-added service of BOS, and will charge you a certain amount of fee according to the size of the source file you scanned (GB). Please refer to the billing item information and use price for more detailed information. If the export of the scanning results fails due to SQL syntax or system error, no fee will be charged for the scan.

          Select scanning

          1.Log in BOS administrative console, and enter the page of global overview.

          2.Select the target Bucket where the file to be scanned is located from the navbar on the left of BOS console, and click to open the page on which the file list of Bucket is shown.

          3.Click the action bar on the right of the target file from more ->Select scanning. Select scanning is an operation on the cloud for the big data scenario, which has a certain requirement for the file type. Only the file of .csv and .json format supports for Select scanning and the files of other types do not.

          4.From the window on the right, you need to select the file to be scanned at first, and then configure the source file.

          File type Configuration name Configuration description
          CSV Title field
          • Including: Indicating that the file scanned contains header information;
          • Excluding: Indicating that the file scanned contains header information;
          • No matter whether the file contains header information, the console supports to extract a certain column through column number, but not through header. If you want to extract a certain column through the header, please use Select API.
          Separator
          • Specify the column separator for csv files, encode with Base64, with a maximum of 1 character;
          • The separator defaults to comma, with \t, \n, Tab, semicolon and customization supported
          Compression mode
          • Specify if the Object queried is compressed, the optional value can be compression free or GZIP
          Export format Currently, exporting the scanning results of CSV format is supported only
          Encrypted format Select scanning supports to scan the encrypted files, and the console will recognize the encrypted status of the scanned file automatically
          JSON JSON type
          • The Json Object format queried supports "DOCUMENT" or "LINES"
          Compression mode
          • Specify if the Object queried is compressed, the optional value can be compression free or GZIP
          Export format Currently, exporting the scanning results of CSV format is supported only
          Encrypted format Select scanning supports to scan the encrypted files, and the console will recognize the encrypted status of the scanned file automatically

          5.After configuring the scanned files, you also need to input SQL statements, click Run to scan the file. BOS provides you with several commonly used SQL statement templates, and you can select the statements as required. The commonly used SQL statements of CSV file can be used to view the commonly used SQL statements of CSV; the commonly used SQL statements of JSON file can be used to view the commonly used SQL statements of JSON.

          6.View the scanned results. After clicking to scan now, you can view the scanned results. If the scan failed, BOS will return corresponding error code in the result box, the scan will not be charged at this point.

          Note

          • After you close the scan window, the Select scan results will be cached in your browser automatically; meanwhile, an alarm clock will be generated behind the corresponding file in the file list. When you open the scan window again, you still can view the scanned results. If you are to scan the same file again, or close the browser, the cached results will be cleared automatically.
          Previous
          Manage Bucket
          Next
          Data Release