> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pba-ctools/pentaho-cdf-api/queries/cdaquery.md).

# CdaQuery

## cdf.queries. CdaQuery

Static

Class that represents a CDA query. This class will be registered globally using the static dashboard function `registerGlobalQuery`.

The constructor of this class is created dynamically and registered in the dashboard query container `queryFactories`.

To create a new CDA query use the dashboard function `getQuery`.

\*\*Source:\*\*queries/CdaQuery.js, line 27

## Extends

cdf.queries.BaseQuery

## Example

```
dashboard.addDataSource("myCdaQuery", {
 queryType: "cda", dataAccessId: "cdaQuery", path: "/public/myQ.cda"
});
dashboard.getQuery({dataSource: "myCdaQuery"}).doQuery(successCallback, errorCallback);
```

## Members

| Name                                                    | Description                                                    |
| ------------------------------------------------------- | -------------------------------------------------------------- |
| \_label : `string`Constant Protected                    | The class label.                                               |
| \_name : `string`Constant Protected                     | The class name.                                                |
| dashboard : `cdf.dashboard.Dashboard`Protected          | A reference to the dashboard instance.                         |
| deepProperties : ``Array.<`string`>``Constant Protected | A list of properties to be extended to the registered queries. |
| defaults : `Object`Protected                            | The default properties.                                        |
| interfaces : `Object`Protected                          | The default interfaces.                                        |

## Methods

| Name                                                          | Description                                                                   |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| buildQueryDefinition(overrides) : `object`                    | Builds the query definition object.                                           |
| dispose()                                                     | Dispose the query object.                                                     |
| doQuery(successCallback, errorCallback)                       | Executes a server-side query.                                                 |
| exportData(outputType, overrides, options)                    | Exports the data, according to a specific output type.                        |
| fetchData(params, successCallback, errorCallback) : `Object`  | Fetches the data.                                                             |
| getErrorHandler(callback) : `function`                        | Gets the error callback handler.                                              |
| getOption(prop) : `Object`                                    | Gets an option (fallback for when the OptionManager is not available).        |
| getPage(targetPage, outsideCallback) : `boolean` \| `Object`  | Gets the set of results for the page at index `targetPage` (0-indexed).       |
| getSuccessHandler(callback) : `function`                      | Gets the success callback handler.                                            |
| init(opts)                                                    | Initializes a CDA query.                                                      |
| initPage(pageSize, outsideCallback) : `boolean` \| `Object`   | Sets the page size and gets the first page of results.                        |
| lastProcessedResults() : `Object`                             | Gets the last retrieved result after being processed by postFetch.            |
| lastResults() : `Object`                                      | Gets the last retrieved result.                                               |
| nextPage(outsideCallback) : `Object`                          | Gets the next page of results, as controlled by the `pageSize` option.        |
| pageStartingAt(page, outsideCallback) : `boolean` \| `Object` | Runs the query, setting a starting page before doing so.                      |
| previousPage(outsideCallback) : `Object`                      | Gets the previous page of results, as controlled by the `pageSize` option.    |
| reprocessLastResults(outerCallback) : `Object`                | Reruns the success callback on the last retrieved result set from the server. |
| reprocessResults(outsideCallback) : `Object`                  | Alias for `reprocessLastResults`.                                             |
| setAjaxOptions(newOptions)                                    | Sets the jQuery.ajax options for the query.                                   |
| setCallback(callback)                                         | Sets the success callback for the query.                                      |
| setErrorCallback(callback)                                    | Sets the error callback for the query.                                        |
| setOption(prop, value)                                        | Sets an option (fallback for when the OptionManager is not available).        |
| setPageSize(pageSize)                                         | Sets the page size.                                                           |
| setPageStartingAt(targetPage) : `boolean`                     | Sets the starting page for later executions of the query.                     |
| setParameters(params)                                         | Sets query parameters.                                                        |
| setSearchPattern(pattern)                                     | Sets the search pattern for the query.                                        |
| setSortBy(sortBy) : `boolean`                                 | Sets the sort by columns.                                                     |
| sortBy(sortBy, outsideCallback) : `boolean` \| `Object`       | Sorts the result set.                                                         |

## Members Details

| \_label: `string`Constant Protected                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>The class label.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 74</p><p><strong>Default Value:</strong>"CDA Query"</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#\_label</p> |

| \_name: `string`Constant Protected                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p>The class name.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 59</p><p><strong>Default Value:</strong>"cda"</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#\_name</p> |

| dashboard: `cdf.dashboard.Dashboard`Protected                                                                                                                           |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>A reference to the dashboard instance.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 76</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#dashboard</p> |

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td>deepProperties: <code>Array.&#x3C;`string`></code>Constant Protected</td></tr><tr><td><p>A list of properties to be extended to the registered queries that do not provide their own constructor function.</p><p>**Source:**queries/BaseQuery.js, line 67</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#deepProperties</p><p><strong>Default Value:</strong></p><pre><code>`["defaults","interfaces"]`
</code></pre><p><strong>See also:</strong><code>registerQuery</code></p></td></tr></tbody></table>

| defaults: `Object`Protected                                                                                                             |                                               |                                        |
| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------------------------------------- |
| <p>The default properties.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 93</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#defaults</p> |                                               |                                        |
| Name                                                                                                                                    | Default Value                                 | Description                            |
| url : `string`                                                                                                                          |                                               | The target endpoint URL.               |
| file : `string`                                                                                                                         | ""                                            | The target file name.                  |
| id : `string`                                                                                                                           | ""                                            | The target identifier.                 |
| outputIdx : `string`                                                                                                                    | "1"                                           | The default output index.              |
| sortBy : `string`                                                                                                                       | ""                                            | The default sorting order.             |
| ajaxOptions : `Object`                                                                                                                  | {async:true,xhrFields:{withCredentials:true}} | The jQuery.ajax options for the query. |
| searchPattern : `string`                                                                                                                | ""                                            | The default search pattern.            |

| Name                     | Default Value                                 | Description                            |
| ------------------------ | --------------------------------------------- | -------------------------------------- |
| url : `string`           |                                               | The target endpoint URL.               |
| file : `string`          | ""                                            | The target file name.                  |
| id : `string`            | ""                                            | The target identifier.                 |
| outputIdx : `string`     | "1"                                           | The default output index.              |
| sortBy : `string`        | ""                                            | The default sorting order.             |
| ajaxOptions : `Object`   | {async:true,xhrFields:{withCredentials:true}} | The jQuery.ajax options for the query. |
| searchPattern : `string` | ""                                            | The default search pattern.            |

| interfaces: `Object`Protected                                                                                                                              |                             |                              |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ---------------------------- |
| <p>The default interfaces.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 138</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#interfaces</p> |                             |                              |
| Name                                                                                                                                                       | Default Value               | Description                  |
| params : `Object`                                                                                                                                          |                             | Parameter interfaces.        |
| Name                                                                                                                                                       | Default Value               | Description                  |
| reader : `string`                                                                                                                                          | "propertiesObject"          | Parameter reader.            |
| validator : `string`                                                                                                                                       | "isObjectOrPropertiesArray" | Parameter validator.         |
| successCallback : `Object`                                                                                                                                 |                             | Success callback interfaces. |
| Name                                                                                                                                                       | Default Value               | Description                  |
| validator : `string`                                                                                                                                       | "isFunction"                | Success callback validator.  |
| errorCallback : `Object`                                                                                                                                   |                             | Error callback interfaces.   |
| Name                                                                                                                                                       | Default Value               | Description                  |
| validator : `string`                                                                                                                                       | "isFunction"                | Error callback validator.    |
| pageSize : `Object`                                                                                                                                        |                             | Page size interfaces.        |
| Name                                                                                                                                                       | Default Value               | Description                  |
| validator : `string`                                                                                                                                       | "isPositive"                | Page size validator.         |

| Name                 | Default Value | Description          |
| -------------------- | ------------- | -------------------- |
| validator : `string` | "isPositive"  | Page size validator. |

| Name                 | Default Value | Description               |
| -------------------- | ------------- | ------------------------- |
| validator : `string` | "isFunction"  | Error callback validator. |

| Name                 | Default Value | Description                 |
| -------------------- | ------------- | --------------------------- |
| validator : `string` | "isFunction"  | Success callback validator. |

| Name                 | Default Value               | Description          |
| -------------------- | --------------------------- | -------------------- |
| reader : `string`    | "propertiesObject"          | Parameter reader.    |
| validator : `string` | "isObjectOrPropertiesArray" | Parameter validator. |

| Name                       | Default Value               | Description                  |
| -------------------------- | --------------------------- | ---------------------------- |
| params : `Object`          |                             | Parameter interfaces.        |
| Name                       | Default Value               | Description                  |
| reader : `string`          | "propertiesObject"          | Parameter reader.            |
| validator : `string`       | "isObjectOrPropertiesArray" | Parameter validator.         |
| successCallback : `Object` |                             | Success callback interfaces. |
| Name                       | Default Value               | Description                  |
| validator : `string`       | "isFunction"                | Success callback validator.  |
| errorCallback : `Object`   |                             | Error callback interfaces.   |
| Name                       | Default Value               | Description                  |
| validator : `string`       | "isFunction"                | Error callback validator.    |
| pageSize : `Object`        |                             | Page size interfaces.        |
| Name                       | Default Value               | Description                  |
| validator : `string`       | "isPositive"                | Page size validator.         |

| Name                 | Default Value | Description          |
| -------------------- | ------------- | -------------------- |
| validator : `string` | "isPositive"  | Page size validator. |

| Name                 | Default Value | Description               |
| -------------------- | ------------- | ------------------------- |
| validator : `string` | "isFunction"  | Error callback validator. |

| Name                 | Default Value | Description                 |
| -------------------- | ------------- | --------------------------- |
| validator : `string` | "isFunction"  | Success callback validator. |

| Name                 | Default Value               | Description          |
| -------------------- | --------------------------- | -------------------- |
| reader : `string`    | "propertiesObject"          | Parameter reader.    |
| validator : `string` | "isObjectOrPropertiesArray" | Parameter validator. |

\## Methods Details

| **buildQueryDefinition**(overrides) : `object`                                                                                                                   |                          |                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------- |
| <p>Builds the query definition object.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 158</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#buildQueryDefinition</p> |                          |                                                                   |
| Name                                                                                                                                                             | Default Value            | Summary                                                           |
| overrides : `object`                                                                                                                                             |                          | New query definitions to override any existing query definitions. |
| Name                                                                                                                                                             | Description              |                                                                   |
| `object`                                                                                                                                                         | Query definition object. |                                                                   |

| Name     | Description              |
| -------- | ------------------------ |
| `object` | Query definition object. |

| Name                 | Default Value | Summary                                                           |
| -------------------- | ------------- | ----------------------------------------------------------------- |
| overrides : `object` |               | New query definitions to override any existing query definitions. |

| **dispose**()                                                                                                                             |
| ----------------------------------------------------------------------------------------------------------------------------------------- |
| <p>Dispose the query object.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 431</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#dispose</p> |

| **doQuery**(successCallback, errorCallback)                                                                                                   |               |                   |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ----------------- |
| <p>Executes a server-side query.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 367</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#doQuery</p> |               |                   |
| Name                                                                                                                                          | Default Value | Summary           |
| successCallback : `function`Optional                                                                                                          |               | Success callback. |
| errorCallback : `function`Optional                                                                                                            |               | Error callback.   |

| Name                                 | Default Value | Summary           |
| ------------------------------------ | ------------- | ----------------- |
| successCallback : `function`Optional |               | Success callback. |
| errorCallback : `function`Optional   |               | Error callback.   |

| **exportData**(outputType, overrides, options)                                                                                                                            |               |                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ----------------------------------------------------- |
| <p>Exports the data, according to a specific output type.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 207</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#exportData</p> |               |                                                       |
| Name                                                                                                                                                                      | Default Value | Summary                                               |
| outputType : `string`                                                                                                                                                     |               | Output type (CSV, XLS, XML, HTML).                    |
| overrides : `object`                                                                                                                                                      |               | Overrides for the query definition object.            |
| options : `object`                                                                                                                                                        |               | Export options.                                       |
| Name                                                                                                                                                                      | Default Value | Summary                                               |
| separator : `string`                                                                                                                                                      |               | Separator.                                            |
| filename : `string`                                                                                                                                                       |               | File name.                                            |
| template : `string`                                                                                                                                                       |               | Template name.                                        |
| columnHeaders : `object`                                                                                                                                                  |               | The column headers.                                   |
| dtFilter : `object`                                                                                                                                                       |               | Data table filter.                                    |
| dtSearchableColumns : `object`                                                                                                                                            |               | Data table searchable columns.                        |
| exportPage : `boolean`                                                                                                                                                    |               | Export only one page (true) or full data set (false). |

| Name                           | Default Value | Summary                                               |
| ------------------------------ | ------------- | ----------------------------------------------------- |
| separator : `string`           |               | Separator.                                            |
| filename : `string`            |               | File name.                                            |
| template : `string`            |               | Template name.                                        |
| columnHeaders : `object`       |               | The column headers.                                   |
| dtFilter : `object`            |               | Data table filter.                                    |
| dtSearchableColumns : `object` |               | Data table searchable columns.                        |
| exportPage : `boolean`         |               | Export only one page (true) or full data set (false). |

| Name                           | Default Value | Summary                                               |
| ------------------------------ | ------------- | ----------------------------------------------------- |
| outputType : `string`          |               | Output type (CSV, XLS, XML, HTML).                    |
| overrides : `object`           |               | Overrides for the query definition object.            |
| options : `object`             |               | Export options.                                       |
| Name                           | Default Value | Summary                                               |
| separator : `string`           |               | Separator.                                            |
| filename : `string`            |               | File name.                                            |
| template : `string`            |               | Template name.                                        |
| columnHeaders : `object`       |               | The column headers.                                   |
| dtFilter : `object`            |               | Data table filter.                                    |
| dtSearchableColumns : `object` |               | Data table searchable columns.                        |
| exportPage : `boolean`         |               | Export only one page (true) or full data set (false). |

| Name                           | Default Value | Summary                                               |
| ------------------------------ | ------------- | ----------------------------------------------------- |
| separator : `string`           |               | Separator.                                            |
| filename : `string`            |               | File name.                                            |
| template : `string`            |               | Template name.                                        |
| columnHeaders : `object`       |               | The column headers.                                   |
| dtFilter : `object`            |               | Data table filter.                                    |
| dtSearchableColumns : `object` |               | Data table searchable columns.                        |
| exportPage : `boolean`         |               | Export only one page (true) or full data set (false). |

| **fetchData**(params, successCallback, errorCallback) : `Object`                                                                                    |                                                               |                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------- |
| <p>Fetches the data.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 350</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#fetchData</p> |                                                               |                           |
| Name                                                                                                                                                | Default Value                                                 | Summary                   |
| params : `Object`                                                                                                                                   |                                                               | Parameters for the query. |
| successCallback : `function`                                                                                                                        |                                                               | Success callback.         |
| errorCallback : `function`                                                                                                                          |                                                               | Error callback.           |
| Name                                                                                                                                                | Description                                                   |                           |
| `Object`                                                                                                                                            | The result of calling `doQuery` with the specified arguments. |                           |
| Name                                                                                                                                                | Description                                                   |                           |
| `InvalidInput`                                                                                                                                      | If the arguments are not correct.                             |                           |

| Name           | Description                       |
| -------------- | --------------------------------- |
| `InvalidInput` | If the arguments are not correct. |

| Name     | Description                                                   |
| -------- | ------------------------------------------------------------- |
| `Object` | The result of calling `doQuery` with the specified arguments. |

| Name                         | Default Value | Summary                   |
| ---------------------------- | ------------- | ------------------------- |
| params : `Object`            |               | Parameters for the query. |
| successCallback : `function` |               | Success callback.         |
| errorCallback : `function`   |               | Error callback.           |

| **getErrorHandler**(callback) : `function`                                                                                                                                                                                                   |                         |                                      |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------------ |
| <p>Gets the error callback handler that executes the provided callback when the query fails to execute.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 253</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#getErrorHandler</p> |                         |                                      |
| Name                                                                                                                                                                                                                                         | Default Value           | Summary                              |
| callback : `function`                                                                                                                                                                                                                        |                         | Callback to call if the query fails. |
| Name                                                                                                                                                                                                                                         | Description             |                                      |
| `function`                                                                                                                                                                                                                                   | Error callback handler. |                                      |

| Name       | Description             |
| ---------- | ----------------------- |
| `function` | Error callback handler. |

| Name                  | Default Value | Summary                              |
| --------------------- | ------------- | ------------------------------------ |
| callback : `function` |               | Callback to call if the query fails. |

| **getOption**(prop) : `Object`                                                                                                                                                                           |                       |                                             |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------------------- |
| <p>Gets an option (fallback for when the OptionManager is not available).</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 183</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#getOption</p> |                       |                                             |
| Name                                                                                                                                                                                                     | Default Value         | Summary                                     |
| prop : `string`                                                                                                                                                                                          |                       | The property from where to get the options. |
| Name                                                                                                                                                                                                     | Description           |                                             |
| `Object`                                                                                                                                                                                                 | Value for the option. |                                             |

| Name     | Description           |
| -------- | --------------------- |
| `Object` | Value for the option. |

| Name            | Default Value | Summary                                     |
| --------------- | ------------- | ------------------------------------------- |
| prop : `string` |               | The property from where to get the options. |

| **getPage**(targetPage, outsideCallback) : `boolean` \| `Object`                                                                                                                                                   |                                                                                                    |                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| <p>Gets the set of results for the page at index <code>targetPage</code> (0-indexed).</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 580</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#getPage</p> |                                                                                                    |                                                         |
| Name                                                                                                                                                                                                               | Default Value                                                                                      | Summary                                                 |
| targetPage : `number`                                                                                                                                                                                              |                                                                                                    | Index of the page to get, starting at index 0.          |
| outsideCallback : `function`                                                                                                                                                                                       |                                                                                                    | Success callback to execute when the page is retrieved. |
| Name                                                                                                                                                                                                               | Description                                                                                        |                                                         |
| `boolean` \| `Object`                                                                                                                                                                                              | `false` if the page is already the current one, otherwise returns the result of calling `doQuery`. |                                                         |
| Name                                                                                                                                                                                                               | Description                                                                                        |                                                         |
| `InvalidPage`                                                                                                                                                                                                      | If `targetPage` is not a positive number.                                                          |                                                         |

| Name          | Description                               |
| ------------- | ----------------------------------------- |
| `InvalidPage` | If `targetPage` is not a positive number. |

| Name                  | Description                                                                                        |
| --------------------- | -------------------------------------------------------------------------------------------------- |
| `boolean` \| `Object` | `false` if the page is already the current one, otherwise returns the result of calling `doQuery`. |

| Name                         | Default Value | Summary                                                 |
| ---------------------------- | ------------- | ------------------------------------------------------- |
| targetPage : `number`        |               | Index of the page to get, starting at index 0.          |
| outsideCallback : `function` |               | Success callback to execute when the page is retrieved. |

| **getSuccessHandler**(callback) : `function`                                                                                                                                                                                                          |                           |                                                 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ----------------------------------------------- |
| <p>Gets the success callback handler that executes the provided callback when the query executes successfully.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 230</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#getSuccessHandler</p> |                           |                                                 |
| Name                                                                                                                                                                                                                                                  | Default Value             | Summary                                         |
| callback : `function`                                                                                                                                                                                                                                 |                           | Callback to call after the query is successful. |
| Name                                                                                                                                                                                                                                                  | Description               |                                                 |
| `function`                                                                                                                                                                                                                                            | Success callback handler. |                                                 |

| Name       | Description               |
| ---------- | ------------------------- |
| `function` | Success callback handler. |

| Name                  | Default Value | Summary                                         |
| --------------------- | ------------- | ----------------------------------------------- |
| callback : `function` |               | Callback to call after the query is successful. |

| **init**(opts)                                                                                                                           |               |                                       |   |      |             |   |                |                                                                               |      |   |   |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------- | - | ---- | ----------- | - | -------------- | ----------------------------------------------------------------------------- | ---- | - | - |
| <p>Initializes a CDA query.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 125</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#init</p><p> | Name          | Description                           |   | ---- | ----------- |   | `InvalidQuery` | If the `opts` parameter does not contain a path nor a data access identifier. | </p> |   |   |
| Name                                                                                                                                     | Default Value | Summary                               |   |      |             |   |                |                                                                               |      |   |   |
| opts : `object`                                                                                                                          |               | The query definition object.          |   |      |             |   |                |                                                                               |      |   |   |
| Name                                                                                                                                     | Default Value | Summary                               |   |      |             |   |                |                                                                               |      |   |   |
| path : `string`                                                                                                                          |               | The path to the CDA file.             |   |      |             |   |                |                                                                               |      |   |   |
| dataAccessId : `string`                                                                                                                  |               | The Data access identifier.           |   |      |             |   |                |                                                                               |      |   |   |
| sortBy : `string`Optional                                                                                                                |               | The sorting order.                    |   |      |             |   |                |                                                                               |      |   |   |
| pageSize : `number`Optional                                                                                                              |               | The page size.                        |   |      |             |   |                |                                                                               |      |   |   |
| outputIndexId : `number`Optional                                                                                                         |               | The output index identifier.          |   |      |             |   |                |                                                                               |      |   |   |
| pushEnabled : `boolean`Optional                                                                                                          |               | If the query should run in push mode. |   |      |             |   |                |                                                                               |      |   |   |

| Name                             | Default Value | Summary                               |
| -------------------------------- | ------------- | ------------------------------------- |
| path : `string`                  |               | The path to the CDA file.             |
| dataAccessId : `string`          |               | The Data access identifier.           |
| sortBy : `string`Optional        |               | The sorting order.                    |
| pageSize : `number`Optional      |               | The page size.                        |
| outputIndexId : `number`Optional |               | The output index identifier.          |
| pushEnabled : `boolean`Optional  |               | If the query should run in push mode. |

| Name                             | Default Value | Summary                               |
| -------------------------------- | ------------- | ------------------------------------- |
| opts : `object`                  |               | The query definition object.          |
| Name                             | Default Value | Summary                               |
| path : `string`                  |               | The path to the CDA file.             |
| dataAccessId : `string`          |               | The Data access identifier.           |
| sortBy : `string`Optional        |               | The sorting order.                    |
| pageSize : `number`Optional      |               | The page size.                        |
| outputIndexId : `number`Optional |               | The output index identifier.          |
| pushEnabled : `boolean`Optional  |               | If the query should run in push mode. |

| Name                             | Default Value | Summary                               |
| -------------------------------- | ------------- | ------------------------------------- |
| path : `string`                  |               | The path to the CDA file.             |
| dataAccessId : `string`          |               | The Data access identifier.           |
| sortBy : `string`Optional        |               | The sorting order.                    |
| pageSize : `number`Optional      |               | The page size.                        |
| outputIndexId : `number`Optional |               | The output index identifier.          |
| pushEnabled : `boolean`Optional  |               | If the query should run in push mode. |

| **initPage**(pageSize, outsideCallback) : `boolean` \| `Object`                                                                                                                         |                                                                            |                                                       |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------- |
| <p>Sets the page size and gets the first page of results.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 652</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#initPage</p> |                                                                            |                                                       |
| Name                                                                                                                                                                                    | Default Value                                                              | Summary                                               |
| pageSize : `number`                                                                                                                                                                     |                                                                            | Page Size.                                            |
| outsideCallback : `function`                                                                                                                                                            |                                                                            | Success callback to execute after query is retrieved. |
| Name                                                                                                                                                                                    | Description                                                                |                                                       |
| `boolean` \| `Object`                                                                                                                                                                   | `false` if pageSize is invalid, otherwise the result of calling `doQuery`. |                                                       |
| Name                                                                                                                                                                                    | Description                                                                |                                                       |
| `InvalidPageSize`                                                                                                                                                                       | If the page size is not a positive number.                                 |                                                       |

| Name              | Description                                |
| ----------------- | ------------------------------------------ |
| `InvalidPageSize` | If the page size is not a positive number. |

| Name                  | Description                                                                |
| --------------------- | -------------------------------------------------------------------------- |
| `boolean` \| `Object` | `false` if pageSize is invalid, otherwise the result of calling `doQuery`. |

| Name                         | Default Value | Summary                                               |
| ---------------------------- | ------------- | ----------------------------------------------------- |
| pageSize : `number`          |               | Page Size.                                            |
| outsideCallback : `function` |               | Success callback to execute after query is retrieved. |

| **lastProcessedResults**() : `Object`                                                                                                                                                                           |                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| <p>Gets the last retrieved result after being processed by postFetch.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 432</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#lastProcessedResults</p> |                                                                                                     |
| Name                                                                                                                                                                                                            | Description                                                                                         |
| `Object`                                                                                                                                                                                                        | A deep copy of the the last result set obtained from the server after being processed by postFetch. |
| Name                                                                                                                                                                                                            | Description                                                                                         |
| `NoCachedResults`                                                                                                                                                                                               | If there have not been previous calls to the server.                                                |

| Name              | Description                                          |
| ----------------- | ---------------------------------------------------- |
| `NoCachedResults` | If there have not been previous calls to the server. |

| Name     | Description                                                                                         |
| -------- | --------------------------------------------------------------------------------------------------- |
| `Object` | A deep copy of the the last result set obtained from the server after being processed by postFetch. |

| **lastResults**() : `Object`                                                                                                                                        |                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| <p>Gets the last retrieved result.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 416</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#lastResults</p> |                                                              |
| Name                                                                                                                                                                | Description                                                  |
| `Object`                                                                                                                                                            | A deep copy of the last result set obtained from the server. |
| Name                                                                                                                                                                | Description                                                  |
| `NoCachedResults`                                                                                                                                                   | If there have not been previous calls to the server.         |

| Name              | Description                                          |
| ----------------- | ---------------------------------------------------- |
| `NoCachedResults` | If there have not been previous calls to the server. |

| Name     | Description                                                  |
| -------- | ------------------------------------------------------------ |
| `Object` | A deep copy of the last result set obtained from the server. |

| **nextPage**(outsideCallback) : `Object`                                                                                                                                                                           |                                                   |                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- | ----------------------------------------------------------------------- |
| <p>Gets the next page of results, as controlled by the <code>pageSize</code> option.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 534</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#nextPage</p> |                                                   |                                                                         |
| Name                                                                                                                                                                                                               | Default Value                                     | Summary                                                                 |
| outsideCallback : `function`                                                                                                                                                                                       |                                                   | Success callback to execute when the next page of results is retrieved. |
| Name                                                                                                                                                                                                               | Description                                       |                                                                         |
| `Object`                                                                                                                                                                                                           | The result of calling `doQuery`.                  |                                                                         |
| Name                                                                                                                                                                                                               | Description                                       |                                                                         |
| `InvalidPageSize`                                                                                                                                                                                                  | If the page size option is not a positive number. |                                                                         |

| Name              | Description                                       |
| ----------------- | ------------------------------------------------- |
| `InvalidPageSize` | If the page size option is not a positive number. |

| Name     | Description                      |
| -------- | -------------------------------- |
| `Object` | The result of calling `doQuery`. |

| Name                         | Default Value | Summary                                                                 |
| ---------------------------- | ------------- | ----------------------------------------------------------------------- |
| outsideCallback : `function` |               | Success callback to execute when the next page of results is retrieved. |

| **pageStartingAt**(page, outsideCallback) : `boolean` \| `Object`                                                                                                                                                                                                                                                    |                                                                                  |                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| <p>Runs the query, setting a starting page before doing so. If the starting page matches the already selected one, the query run is canceled and <code>false</code> is returned.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 624</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#pageStartingAt</p> |                                                                                  |                                                                       |
| Name                                                                                                                                                                                                                                                                                                                 | Default Value                                                                    | Summary                                                               |
| page : `number`                                                                                                                                                                                                                                                                                                      |                                                                                  | Starting page index.                                                  |
| outsideCallback : `function`                                                                                                                                                                                                                                                                                         |                                                                                  | Success callback to execute after the server-side query is processed. |
| Name                                                                                                                                                                                                                                                                                                                 | Description                                                                      |                                                                       |
| `boolean` \| `Object`                                                                                                                                                                                                                                                                                                | `false` if the query run is canceled, otherwise the result of calling `doQuery`. |                                                                       |

| Name                  | Description                                                                      |
| --------------------- | -------------------------------------------------------------------------------- |
| `boolean` \| `Object` | `false` if the query run is canceled, otherwise the result of calling `doQuery`. |

| Name                         | Default Value | Summary                                                               |
| ---------------------------- | ------------- | --------------------------------------------------------------------- |
| page : `number`              |               | Starting page index.                                                  |
| outsideCallback : `function` |               | Success callback to execute after the server-side query is processed. |

| **previousPage**(outsideCallback) : `Object`                                                                                                                                                                               |                                   |                                                                             |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------- |
| <p>Gets the previous page of results, as controlled by the <code>pageSize</code> option.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 555</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#previousPage</p> |                                   |                                                                             |
| Name                                                                                                                                                                                                                       | Default Value                     | Summary                                                                     |
| outsideCallback : `function`                                                                                                                                                                                               |                                   | Success callback to execute when the previous page of results is retrieved. |
| Name                                                                                                                                                                                                                       | Description                       |                                                                             |
| `Object`                                                                                                                                                                                                                   | The result of calling `doQuery`.  |                                                                             |
| Name                                                                                                                                                                                                                       | Description                       |                                                                             |
| `AtBeginning`                                                                                                                                                                                                              | If current page is the first one. |                                                                             |

| Name          | Description                       |
| ------------- | --------------------------------- |
| `AtBeginning` | If current page is the first one. |

| Name     | Description                      |
| -------- | -------------------------------- |
| `Object` | The result of calling `doQuery`. |

| Name                         | Default Value | Summary                                                                     |
| ---------------------------- | ------------- | --------------------------------------------------------------------------- |
| outsideCallback : `function` |               | Success callback to execute when the previous page of results is retrieved. |

| **reprocessLastResults**(outerCallback) : `Object`                                                                                                                                                                                                                                       |                                                      |                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------- |
| <p>Reruns the success callback on the last retrieved result set from the server.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 449</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#reprocessLastResults</p><p><strong>See also:</strong><code>reprocessResults</code></p> |                                                      |                   |
| Name                                                                                                                                                                                                                                                                                     | Default Value                                        | Summary           |
| outerCallback : `function`                                                                                                                                                                                                                                                               |                                                      | Success callback. |
| Name                                                                                                                                                                                                                                                                                     | Description                                          |                   |
| `Object`                                                                                                                                                                                                                                                                                 | The result of calling the specified callback.        |                   |
| Name                                                                                                                                                                                                                                                                                     | Description                                          |                   |
| `NoCachedResults`                                                                                                                                                                                                                                                                        | If there have not been previous calls to the server. |                   |

| Name              | Description                                          |
| ----------------- | ---------------------------------------------------- |
| `NoCachedResults` | If there have not been previous calls to the server. |

| Name     | Description                                   |
| -------- | --------------------------------------------- |
| `Object` | The result of calling the specified callback. |

| Name                       | Default Value | Summary           |
| -------------------------- | ------------- | ----------------- |
| outerCallback : `function` |               | Success callback. |

| **reprocessResults**(outsideCallback) : `Object`                                                                                                                                                                                                        |                                                      |                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------- |
| <p>Alias for <code>reprocessLastResults</code>.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 474</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#reprocessResults</p><p><strong>See also:</strong><code>reprocessLastResults</code></p> |                                                      |                   |
| Name                                                                                                                                                                                                                                                    | Default Value                                        | Summary           |
| outsideCallback : `function`                                                                                                                                                                                                                            |                                                      | Success callback. |
| Name                                                                                                                                                                                                                                                    | Description                                          |                   |
| `Object`                                                                                                                                                                                                                                                | The result of calling the specified callback.        |                   |
| Name                                                                                                                                                                                                                                                    | Description                                          |                   |
| `NoCachedResults`                                                                                                                                                                                                                                       | If there have not been previous calls to the server. |                   |

| Name              | Description                                          |
| ----------------- | ---------------------------------------------------- |
| `NoCachedResults` | If there have not been previous calls to the server. |

| Name     | Description                                   |
| -------- | --------------------------------------------- |
| `Object` | The result of calling the specified callback. |

| Name                         | Default Value | Summary           |
| ---------------------------- | ------------- | ----------------- |
| outsideCallback : `function` |               | Success callback. |

| **setAjaxOptions**(newOptions)                                                                                                                                                     |               |                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------- |
| <p>Sets the jQuery.ajax options for the query.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 299</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#setAjaxOptions</p> |               |                           |
| Name                                                                                                                                                                               | Default Value | Summary                   |
| newOptions : `Object`                                                                                                                                                              |               | Ajax options to be added. |

| Name                  | Default Value | Summary                   |
| --------------------- | ------------- | ------------------------- |
| newOptions : `Object` |               | Ajax options to be added. |

| **setCallback**(callback)                                                                                                                                                    |               |                                |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------ |
| <p>Sets the success callback for the query.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 494</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#setCallback</p> |               |                                |
| Name                                                                                                                                                                         | Default Value | Summary                        |
| callback : `function`                                                                                                                                                        |               | The success callback function. |

| Name                  | Default Value | Summary                        |
| --------------------- | ------------- | ------------------------------ |
| callback : `function` |               | The success callback function. |

| **setErrorCallback**(callback)                                                                                                                                                  |               |                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ---------------------------- |
| <p>Sets the error callback for the query.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 504</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#setErrorCallback</p> |               |                              |
| Name                                                                                                                                                                            | Default Value | Summary                      |
| callback : `function`                                                                                                                                                           |               | The error callback function. |

| Name                  | Default Value | Summary                      |
| --------------------- | ------------- | ---------------------------- |
| callback : `function` |               | The error callback function. |

| **setOption**(prop, value)                                                                                                                                                                               |               |                                               |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | --------------------------------------------- |
| <p>Sets an option (fallback for when the OptionManager is not available).</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 194</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#setOption</p> |               |                                               |
| Name                                                                                                                                                                                                     | Default Value | Summary                                       |
| prop : `string`                                                                                                                                                                                          |               | The property for which the value will be set. |
| value : `Object`                                                                                                                                                                                         |               | Value for the property.                       |

| Name             | Default Value | Summary                                       |
| ---------------- | ------------- | --------------------------------------------- |
| prop : `string`  |               | The property for which the value will be set. |
| value : `Object` |               | Value for the property.                       |

| **setPageSize**(pageSize)                                                                                                                               |               |                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ----------------- |
| <p>Sets the page size.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 638</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#setPageSize</p> |               |                   |
| Name                                                                                                                                                    | Default Value | Summary           |
| pageSize : `number`                                                                                                                                     |               | Page size to set. |

| Name                | Default Value | Summary           |
| ------------------- | ------------- | ----------------- |
| pageSize : `number` |               | Page size to set. |

| **setPageStartingAt**(targetPage) : `boolean`                                                                                                                                                       |                                                                                              |                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------- |
| <p>Sets the starting page for later executions of the query.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 602</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#setPageStartingAt</p> |                                                                                              |                           |
| Name                                                                                                                                                                                                | Default Value                                                                                | Summary                   |
| targetPage : `number`                                                                                                                                                                               |                                                                                              | Index of the page to get. |
| Name                                                                                                                                                                                                | Description                                                                                  |                           |
| `boolean`                                                                                                                                                                                           | `true` if the page is correctly set, `false` if the target page is already the selected one. |                           |
| Name                                                                                                                                                                                                | Description                                                                                  |                           |
| `InvalidPage`                                                                                                                                                                                       | If the page number is not a positive number.                                                 |                           |

| Name          | Description                                  |
| ------------- | -------------------------------------------- |
| `InvalidPage` | If the page number is not a positive number. |

| Name      | Description                                                                                  |
| --------- | -------------------------------------------------------------------------------------------- |
| `boolean` | `true` if the page is correctly set, `false` if the target page is already the selected one. |

| Name                  | Default Value | Summary                   |
| --------------------- | ------------- | ------------------------- |
| targetPage : `number` |               | Index of the page to get. |

| **setParameters**(params)                                                                                                                                    |               |                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | --------------------- |
| <p>Sets query parameters.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 484</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#setParameters</p> |               |                       |
| Name                                                                                                                                                         | Default Value | Summary               |
| params : `Object`                                                                                                                                            |               | The query parameters. |

| Name              | Default Value | Summary               |
| ----------------- | ------------- | --------------------- |
| params : `Object` |               | The query parameters. |

| **setSearchPattern**(pattern)                                                                                                                                                   |               |                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------- |
| <p>Sets the search pattern for the query.</p><p>\*\*Source:\*\*queries/BaseQuery.js, line 514</p><p><strong>Inherited From:</strong> cdf.queries.BaseQuery#setSearchPattern</p> |               |                     |
| Name                                                                                                                                                                            | Default Value | Summary             |
| pattern : `string`                                                                                                                                                              |               | The search pattern. |

| Name               | Default Value | Summary             |
| ------------------ | ------------- | ------------------- |
| pattern : `string` |               | The search pattern. |

| **setSortBy**(sortBy) : `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                                               |                        |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------- |
| <p>Sets the sort by columns.</p><p>CDA expects an array of terms consisting of a number and a letter that's either "A" or "D". Each term denotes, in order, a column number and a sort direction: "0A" would then be sorting the first column ascending, and "1D" would sort the second column in descending order. This function accepts either an array with the search terms, or a comma-separated string with the terms: "0A,1D" would then mean the same as the array \["0A","1D"], which would sort the results first by the first column (ascending), and then by the second column (descending).</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 280</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#setSortBy</p> |                                                                               |                        |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Default Value                                                                 | Summary                |
| sortBy : `string` \| `Array.<`string`>`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                               | Sorting columns order. |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Description                                                                   |                        |
| `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `true` if the sort by condition has changed, `false` if it remained the same. |                        |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Description                                                                   |                        |
| `InvalidSortExpression`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | If the sort by columns are not correctly defined.                             |                        |

| Name                    | Description                                       |
| ----------------------- | ------------------------------------------------- |
| `InvalidSortExpression` | If the sort by columns are not correctly defined. |

| Name      | Description                                                                   |
| --------- | ----------------------------------------------------------------------------- |
| `boolean` | `true` if the sort by condition has changed, `false` if it remained the same. |

| Name                                    | Default Value | Summary                |
| --------------------------------------- | ------------- | ---------------------- |
| sortBy : `string` \| `Array.<`string`>` |               | Sorting columns order. |

| **sortBy**(sortBy, outsideCallback) : `boolean` \| `Object`                                                                                                                                              |                                                                                                |                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| <p>Sorts the result set. See the notes on sort columns on the <code>setSortBy</code> method.</p><p>\*\*Source:\*\*queries/CdaQuery.js, line 348</p><p>\*\*Overrides:\*\*cdf.queries.BaseQuery#sortBy</p> |                                                                                                |                                                        |
| Name                                                                                                                                                                                                     | Default Value                                                                                  | Summary                                                |
| sortBy : `string`                                                                                                                                                                                        |                                                                                                | Sorting columns order.                                 |
| outsideCallback : `function`                                                                                                                                                                             |                                                                                                | Callback to call after the sorting has been processed. |
| Name                                                                                                                                                                                                     | Description                                                                                    |                                                        |
| `boolean` \| `Object`                                                                                                                                                                                    | `false` if the sort by conditions have not changed, the result of calling `doQuery` otherwise. |                                                        |

| Name                  | Description                                                                                    |
| --------------------- | ---------------------------------------------------------------------------------------------- |
| `boolean` \| `Object` | `false` if the sort by conditions have not changed, the result of calling `doQuery` otherwise. |

| Name                         | Default Value | Summary                                                |
| ---------------------------- | ------------- | ------------------------------------------------------ |
| sortBy : `string`            |               | Sorting columns order.                                 |
| outsideCallback : `function` |               | Callback to call after the sorting has been processed. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pba-ctools/pentaho-cdf-api/queries/cdaquery.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
