---
schema_version: "1"
id: 34bd761855a033f55e036c975a3b9121c95450ff684e1244c786cc0a68ed3c91
title: ConnectApi.CdpQueryOutputV2
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_output_cdp_query_output_v2.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_cdp_query_output_v2.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 10b9535a727d1a04d6444fcbfc907cb608278ad73b27b590029cc28148855a36
description: Query output for the V2 API.
---
# ConnectApi.CdpQueryOutputV2

Query output for the V2 API.

<table class="featureTable sort_table" summary="">
          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d874663e27">Property Name</th>
              <th class="featureTableHeader vertical-align-top " id="d874663e29">Type</th>
              <th class="featureTableHeader vertical-align-top " id="d874663e31">Description</th>
              <th class="featureTableHeader vertical-align-top " id="d874663e33">Available Version</th>
            </tr>
          </thead>
          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d874663e27" data-title="Property Name"><samp class="codeph apex_code">data</samp></td>
              <td class="entry" headers="d874663e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_cdp_query_v2_row.htm" title="Row in the query output for the V2 API."><samp class="codeph apex_code">ConnectApi.​CdpQueryV2Row</samp></a>&gt; (in version 55.0 and
                later)<p class="p"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;Object&gt;
                  (version 54.0 only)</p>
              </td>
              <td class="entry" headers="d874663e31" data-title="Description">Result data set.</td>
              <td class="entry" headers="d874663e33" data-title="Available Version">54.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d874663e27" data-title="Property Name"><samp class="codeph apex_code">done</samp></td>
              <td class="entry" headers="d874663e29" data-title="Type">Boolean</td>
              <td class="entry" headers="d874663e31" data-title="Description">Specifies whether the query is done (<samp class="codeph apex_code"><span class="keyword">true</span></samp>) or not (<samp class="codeph apex_code"><span class="keyword">false</span></samp>).</td>
              <td class="entry" headers="d874663e33" data-title="Available Version">54.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d874663e27" data-title="Property Name"><samp class="codeph apex_code">endTime</samp></td>
              <td class="entry" headers="d874663e29" data-title="Type">String</td>
              <td class="entry" headers="d874663e31" data-title="Description">Query end time.</td>
              <td class="entry" headers="d874663e33" data-title="Available Version">54.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d874663e27" data-title="Property Name"><samp class="codeph apex_code">metadata</samp></td>
              <td class="entry" headers="d874663e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_map.htm#apex_methods_system_map" title="Contains methods for the Map collection type.">Map</a>&lt;String, <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_cdp_query_metadata_item.htm" title="Metadata item."><samp class="codeph apex_code">ConnectApi.​CdpQuery​MetadataItem</samp></a>&gt; (version
                55.0 and later)<p class="p"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_map.htm#apex_methods_system_map" title="Contains methods for the Map collection type.">Map</a>&lt;String, Object&gt;
                  (version 54.0 only)</p>
              </td>
              <td class="entry" headers="d874663e31" data-title="Description">Result metadata set.</td>
              <td class="entry" headers="d874663e33" data-title="Available Version">54.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d874663e27" data-title="Property Name"><samp class="codeph apex_code">nextBatchId</samp></td>
              <td class="entry" headers="d874663e29" data-title="Type">String</td>
              <td class="entry" headers="d874663e31" data-title="Description">
                <span class="ph" id="nextBatchId"><a name="nextBatchId"><!-- --></a>Next batch ID.</span>
                <p class="p">Use this property as the
                  <var class="keyword varname">nextBatchId</var> parameter in the <samp class="codeph apex_code"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CdpQuery_static_methods.htm#apex_ConnectAPI_CdpQuery_nextBatchAnsiSqlV2_1" title="Get the next batch of data across data model, lake, unified, and linked objects.">nextBatchAnsiSqlV2(nextBatchId)</a></samp> method to get the next batch of
                  data.
                </p>
              </td>
              <td class="entry" headers="d874663e33" data-title="Available Version">54.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d874663e27" data-title="Property Name"><samp class="codeph apex_code">queryId</samp></td>
              <td class="entry" headers="d874663e29" data-title="Type">String</td>
              <td class="entry" headers="d874663e31" data-title="Description">Query ID.</td>
              <td class="entry" headers="d874663e33" data-title="Available Version">54.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d874663e27" data-title="Property Name"><samp class="codeph apex_code">rowCount</samp></td>
              <td class="entry" headers="d874663e29" data-title="Type">Integer</td>
              <td class="entry" headers="d874663e31" data-title="Description">Number of rows in the result data set.</td>
              <td class="entry" headers="d874663e33" data-title="Available Version">54.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d874663e27" data-title="Property Name"><samp class="codeph apex_code">startTime</samp></td>
              <td class="entry" headers="d874663e29" data-title="Type">String</td>
              <td class="entry" headers="d874663e31" data-title="Description">Query start time.</td>
              <td class="entry" headers="d874663e33" data-title="Available Version">54.0</td>
            </tr>
          </tbody>
        </table>

#### See Also

- [queryAnsiSqlV2(input)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CdpQuery_static_methods.htm#apex_ConnectAPI_CdpQuery_queryAnsiSqlV2_2 "Query data across data model, lake, unified, and linked objects.")
- [queryAnsiSqlV2(input, dataspace)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CdpQuery_static_methods.htm#apex_ConnectAPI_CdpQuery_queryAnsiSqlV2_3 "Query data across data model, lake, unified, and linked objects. Also, specify the data space.")
- [nextBatchAnsiSqlV2(nextBatchId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CdpQuery_static_methods.htm#apex_ConnectAPI_CdpQuery_nextBatchAnsiSqlV2_1 "Get the next batch of data across data model, lake, unified, and linked objects.")
- [nextBatchAnsiSqlV2(nextBatchId, dataspace)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CdpQuery_static_methods.htm#apex_ConnectAPI_CdpQuery_nextBatchAnsiSqlV2_2 "Get the next batch of data across data model, lake, unified, and linked objects. Also, specify the data space.")