Problem description
A Range element is configured in the XML structure of the SelectObject request, but SelectMeta of the destination object does not match that configured in the XML structure of the request.
Causes
You initiated a SelectObject request and specified the range of the object to be queried by using the Range element in the XML structure of the request. However, SelectMeta of the queried object does not match that specified in the request. For example, SelectMeta does not match the value of the RecordDelimiter element or the QuoteCharacter element.
Examples
For example, you create SelectMeta by initiating a CreateSelectObjectMeta request.
POST /samplecsv?x-oss-process=csv/meta
Date: Fri, 25 May 2018 22:11:39 GMT
Authorization: OSS qn6q**************:77Dv****************
Host: host name
<CsvMetaRequest>
<InputSerialization>
<CompressionType>None</CompressionType>
<CSV>
<RecordDelimiter>LA==</RecordDelimiter>
<FieldDelimiter>Cg==</FieldDelimiter>
<QuoteCharacter>Ig==</QuoteCharacter>
</CSV>
</InputSerialization>
<OverwriteIfExists>true</OverwriteIfExists>
</CsvMetaRequest>
Then, initiate the following SelectObject request:
POST /oss-select/bigcsv_normal.csv?x-oss-process=csv%2Fselect HTTP/1.1
Date: Fri, 25 May 2018 22:11:39 GMT
Authorization: OSS qn6q**************:77Dv****************
Host: host name
<?xml version="1.0"?>
<SelectRequest>
<Expression>c2VsZWN0IGNvdW50KCopIGZyb20gb3Nzb2JqZWN0IHdoZXJlIF80ID4gNDU=
</Expression>
<InputSerialization>
<CSV>
<Range>line-range=10-20</Range>
<FileHeaderInfo>Ignore</FileHeaderInfo>
<RecordDelimiter>Cg==</RecordDelimiter>
<FieldDelimiter>LA==</FieldDelimiter>
<QuoteCharacter>Ig==</QuoteCharacter>
</CSV>
</InputSerialization>
<OutputSerialization>
......
</OutputSerialization>
</SelectRequest>
The value of RecordDelimiter
and FieldDelimiter
specified in the SelectObject request are inconsistent with those specified in the CreateSelectObjectMeta request. As a result, a request error is reported.
Solutions
If you want to specify the range of the object to be queried, you can configure a Range element in the XML. If you use a Range element to query objects, you must include SelectMeta in the request, and parameters in the request must be consistent with the corresponding parameters in SelectMeta. For more information, see SelectObject.
Adjust the XML structure of the request based on the values of the Select Meta parameters returned in the error message.