<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Dear Pierre,<br>
<br>
I agree this is not convenient for a client or user. What my TAP
library does on server-side is to set the <font face="monospace">MAXREC</font>
to <font face="monospace">min(max_output_limit, user_MAXREC)</font>
and if the result really exceeds this limit an overflow flag will be
raised. As far as I know, this is the behavior described by TAP-1.x
and DALI.<br>
<br>
In order to avoid the kind of problem you describe on client-side, I
would recommend to read the max/hard output limit (xpath: <font
face="monospace">/vosi:capabilities/capability/outputLimit/hard</font>)
provided in the <font face="monospace">/capabilities</font>
endpoint of the TAP service (<a
href="https://mast.stsci.edu/vo-tap/api/v0.1/hsc/capabilities"
class="moz-txt-link-freetext">https://mast.stsci.edu/vo-tap/api/v0.1/hsc/capabilities</a>
for the TAP service you tried) and to perform yourself the
correction of the <font face="monospace">MAXREC</font>, if needed.
It is indeed not ideal but, if this piece of information is provided
in this endpoint, this trick may prevent this error in the future.<br>
<br>
Cheers,<br>
Grégory<br>
<br>
<br>
<div class="moz-cite-prefix">On 14/12/2023 14:37, Pierre Fernique
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:e1483eb3-1f9a-4a38-98da-99c33a72583f@astro.unistra.fr">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p><br>
</p>
<p>Dear TAP experts,<br>
</p>
While testing the various TAP services accessible via Aladin
Desktop, I discovered an interpretation of the MAXREC parameter
that I hadn't anticipated, and I'm wondering about its validity.<br>
<br>
For example, if I query MAST TAP HSC, with a MAXREC of 2M, I don't
get the table I want, but an error as shown below.<br>
<br>
<a class="moz-txt-link-freetext"
href="https://mast.stsci.edu/vo-tap/api/v0.1/hsc/sync?REQUEST=doQuery&LANG=ADQL&"
moz-do-not-send="true">https://mast.stsci.edu/vo-tap/api/v0.1/hsc/sync?REQUEST=doQuery&LANG=ADQL&</a><b><font
size="4" color="#0000ff">MAXREC=20000000</font></b>&QUERY=SELECT+table_name+FROM+TAP_SCHEMA.tables<br>
<br>
<font face="monospace"><VOTABLE version="1.4"
xsi:schemaLocation=<a class="moz-txt-link-rfc2396E"
href="http://www.ivoa.net/xml/VOTable/v1.3http://www.ivoa.net/xml/VOTable/v1.3"
moz-do-not-send="true">"http://www.ivoa.net/xml/VOTable/v1.3
http://www.ivoa.net/xml/VOTable/v1.3"</a>><br>
<DESCRIPTION>MAST VO TAP Service</DESCRIPTION><br>
<RESOURCE type="results"><br>
<INFO name="QUERY_STATUS" value="ERROR"><br>
<b><font size="4" color="#ff0000">Error in query maxrec:
ensure this value is less than or equal to 100000</font></b><br>
</INFO><br>
</RESOURCE><br>
</VOTABLE></font><br>
<br>
But I would have expected to receive the result correctly,
possibly truncated (OVERFLOW mention) at the internal limit of the
service (100000).<br>
<br>
In fact, such an approach makes it difficult for the client to use
MAXREC, except by trial and error appoach. Either it's too high
and I get an error, or it's too low (but by how much) and I may
not get the full result when I could have. And finally, if I don't
specify a MAXREC, the server will apply the default value, even
though I could have asked for more.<br>
<br>
Any advice on how to deal with this problem?<br>
<p>Thanks<br>
Pierre Fernique<br>
</p>
</blockquote>
<br>
</body>
</html>