0016-00000837
Updated at:
Problem description
The query range in the SelectObject request does not contain a record delimiter.
Causes
You sent a SelectObject request and specified a query range for a file using the Range request header or the Range node in the XML request body. However, no record delimiter (RecordDelimiter) was found within the specified range.
Examples
In the following request, the specified RecordDelimiter is Cg==, which decodes to \n. An error occurs if this record delimiter is not found within the 10 to 20 byte query range specified in the 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: BucketName.oss-cn-hangzhou.aliyuncs.com
Range: bytes=10-20
<?xml version="1.0"?>
<SelectRequest>
<Expression>c2VsZWN0IGNvdW50KCopIGZyb20gb3Nzb2JqZWN0IHdoZXJlIF80ID4gNDU=
</Expression>
<InputSerialization>
<CSV>
<FileHeaderInfo>Ignore</FileHeaderInfo>
<RecordDelimiter>Cg==</RecordDelimiter>
<FieldDelimiter>LA==</FieldDelimiter>
<QuoteCharacter>Ig==</QuoteCharacter>
</CSV>
</InputSerialization>
<OutputSerialization>
......
</OutputSerialization>
</SelectRequest>Solutions
To specify a query range for a file, ensure that a record delimiter exists within the query range. You can perform a range query by including the Range tag in the XML request body, as shown in the following example:
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: BucketName.oss-cn-hangzhou.aliyuncs.com
<?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>References
Is this page helpful?