CdpQuery Class
Namespace
CdpQuery Methods
getAllMetadata()
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryMetadataOutput getAllMetadata()
Return Value
getAllMetadata(entityType, entityCategory, entityName)
API Version
54.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryMetadataOutput getAllMetadata(String entityType, String entityCategory, String entityName)
Parameters
- entityType
- Type: String
- Type of metadata entity requested. Valid values are DataLakeObject, DataModelObject, and CalculatedInsight. If unspecified, all types are returned.
- entityCategory
- Type: String
- Category of the metadata entity. Valid values are Profile, Engagement, and Related. If unspecified, all category entities are returned.
- entityName
- Type: String
- Metadata name of the entity, for example UnifiedIndividual__dlm. If unspecified, a complete list of entities is returned.
Return Value
getInsightsMetadata()
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryMetadataOutput getInsightsMetadata()
Return Value
getInsightsMetadata(ciName)
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryMetadataOutput getInsightsMetadata(String ciName)
Parameters
- ciName
- Type: String
- Name of the Calculated Insight object, for example, IndividualChildrenCount__cio.
Return Value
getProfileMetadata()
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryMetadataOutput getProfileMetadata()
Return Value
getProfileMetadata(dataModelName)
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryMetadataOutput getProfileMetadata(String dataModelName)
Parameters
- dataModelName
- Type: String
- Name of the data model object, for example, UnifiedIndividual__dlm.
Return Value
nextBatchAnsiSqlV2(nextBatchId)
API Version
54.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutputV2 nextBatchAnsiSqlV2(String nextBatchId)
Parameters
- nextBatchId
- Type: String
- ID of the next batch. See the Usage section for more information.
Return Value
Usage
queryANSISql(input)
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryANSISql(ConnectApi.CdpQueryInput input)
Parameters
- input
- Type: ConnectApi.CdpQueryInput
- A ConnectApi.CdpQueryInput body with the SQL query.
Return Value
queryANSISql(input, batchSize, offset, orderby)
API Version
53.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryANSISql(ConnectApi.CdpQueryInput input, Integer batchSize, Integer offset, String orderby)
Parameters
- input
- Type: ConnectApi.CdpQueryInput
- A ConnectApi.CdpQueryInput body with the SQL query.
- batchSize
- Type: Integer
- Number of records to return. Values are from 1–4999. The default value is 4999.
- offset
- Type: Integer
- Number of rows to skip before returning results. The sum of offset and batchSize must be less than 2147483647. The default value is 0.
- orderby
- Type: String
- Comma-separated values to sort the results in ascending or descending order, for example, GenderId__c ASC,Occupation__c DESC.
Return Value
queryAnsiSqlV2(input)
API Version
54.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutputV2 queryAnsiSqlV2(ConnectApi.CdpQueryInput input)
Parameters
- input
- Type: ConnectApi.CdpQueryInput
- A ConnectApi.CdpQueryInput body with the SQL query.
Return Value
Usage
queryCalculatedInsights(ciName, dimensions, measures, orderby, filters, batchSize, offset)
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryCalculatedInsights(String ciName, String dimensions, String measures, String orderby, String filters, Integer batchSize, Integer offset)
Parameters
- ciName
- Type: String
- Name of the Calculated Insight object, for example, IndividualChildrenCount__cio.
- dimensions
- Type: String
- Comma-separated list of up to 10 dimensions, such as GenderId__c, to project. If unspecified, this parameter includes all of the available dimensions.
- measures
- Type: String
- Comma-separated list of up to 5 measures, such as TotalSales__c, to project. If unspecified, this parameter includes all of the available measures.
- orderby
- Type: String
- Sort order for the result set, such as GenderId__c ASC,Occupation__c DESC. If unspecified, items are returned in the order they are retrieved.
- filters
- Type: String
- Filter the result set to a more narrow scope or specific type, such as [GenderId__c=Male,FirstName__c=Angel].
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–4,999. If unspecified, the default value is 4999.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
Return Value
queryCalculatedInsights(ciName, dimensions, measures, orderby, filters, batchSize, offset, timeGranularity)
API Version
54.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryCalculatedInsights(String ciName, String dimensions, String measures, String orderby, String filters, Integer batchSize, Integer offset, String timeGranularity)
Parameters
- ciName
- Type: String
- Name of the Calculated Insight object, for example, IndividualChildrenCount__cio.
- dimensions
- Type: String
- Comma-separated list of up to 10 dimensions, such as GenderId__c, to project. If unspecified, this parameter includes all of the available dimensions.
- measures
- Type: String
- Comma-separated list of up to 5 measures, such as TotalSales__c, to project. If unspecified, this parameter includes all of the available measures.
- orderby
- Type: String
- Sort order for the result set, such as GenderId__c ASC,Occupation__c DESC. If unspecified, items are returned in the order they are retrieved.
- filters
- Type: String
- Filter the result set to a more narrow scope or specific type, such as [GenderId__c=Male,FirstName__c=Angel].
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–4,999. If unspecified, the default value is 4999.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- timeGranularity
- Type: String
-
Time range for the measures. Values are:
- HOUR
- DAY
- MONTH
- QUARTER
- YEAR
Return Value
queryProfileApi(dataModelName, filters, fields, batchSize, offset, orderby)
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryProfileApi(String dataModelName, String filters, String fields, Integer batchSize, Integer offset, String orderby)
Parameters
- dataModelName
- Type: String
- Name of the data model object, for example, UnifiedIndividual__dlm.
- filters
- Type: String
- Comma-separated list of equality expressions within square brackets, for example, [FirstName__c=DON].
- fields
- Type: String
- Comma-separated list of up to 50 field names that you want to include in the result, for example, Id__c,FirstName__c,GenderId__c,Occupation__c. If unspecified, Id__c is returned.
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–4,999. If unspecified, the default value is 100.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- orderby
- Type: String
- Sort order for the result set, such as GenderId__c ASC,Occupation__c DESC. If unspecified, items are returned in the order they are retrieved.
Return Value
queryProfileApi(dataModelName, id, searchKey, filters, fields, batchSize, offset, orderby)
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryProfileApi(String dataModelName, String id, String searchKey, String filters, String fields, Integer batchSize, Integer offset, String orderby)
Parameters
- dataModelName
- Type: String
- Name of the data model object, for example, UnifiedIndividual__dlm.
- id
- Type: String
- Value of the primary or secondary key field, for example, John. If unspecified, defaults to the value of the primary key field.
- searchKey
- Type: String
- If a field other than the primary key is used, name of the key field, for example, FirstName__c.
- filters
- Type: String
- Comma-separated list of equality expressions within square brackets, for example, [FirstName__c=DON].
- fields
- Type: String
- Comma-separated list of up to 50 field names that you want to include in the result, for example, Id__c,FirstName__c,GenderId__c,Occupation__c. If unspecified, Id__c is returned.
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–4,999. If unspecified, the default value is 100.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- orderby
- Type: String
- Sort order for the result set, such as GenderId__c ASC,Occupation__c DESC. If unspecified, items are returned in the order they are retrieved.
Return Value
queryProfileApi(dataModelName, id, childDataModelName, searchKey, filters, fields, batchSize, offset, orderby)
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryProfileApi(String dataModelName, String id, String childDataModelName, String searchKey, String filters, String fields, Integer batchSize, Integer offset, String orderby)
Parameters
- dataModelName
- Type: String
- Name of the data model object, for example, UnifiedIndividual__dlm.
- id
- Type: String
- Value of the primary or secondary key field, for example, John. If unspecified, defaults to the value of the primary key field.
- childDataModelName
- Type: String
- Name of the child data model object, for example, UnifiedContactPointEmail__dlm.
- searchKey
- Type: String
- If a field other than the primary key is used, name of the key field, for example, FirstName__c.
- filters
- Type: String
- Comma-separated list of equality expressions within square brackets, for example, [FirstName__c=DON]. Filters are applied to the parent object only.
- fields
- Type: String
- Comma-separated list of child object field names that you want to include in the result, for example, Id__c,EmailAddress__c. If unspecified, the first 10 alphabetically sorted fields are returned.
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–4,999. If unspecified, the default value is 100.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- orderby
- Type: String
- Sort order for the result set, such as GenderId__c ASC,Occupation__c DESC. If unspecified, items are returned in the order they are retrieved.
Return Value
queryProfileApi(dataModelName, id, ciName, searchKey, dimensions, measures, filters, fields, batchSize, offset, orderby)
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryProfileApi(String dataModelName, String id, String ciName, String searchKey, String dimensions, String measures, String filters, String fields, Integer batchSize, Integer offset, String orderby)
Parameters
- dataModelName
- Type: String
- Name of the data model object, for example, UnifiedIndividual__dlm.
- id
- Type: String
- Value of the primary or secondary key field, for example, John. If unspecified, defaults to the value of the primary key field.
- ciName
- Type: String
- Name of the Calculated Insight object, for example, IndividualChildrenCount__cio.
- searchKey
- Type: String
- If a field other than the primary key is used, name of the key field, for example, FirstName__c.
- dimensions
- Type: String
- Comma-separated list of up to 10 dimensions, such as GenderId__c, to project. If unspecified, this parameter includes all of the available dimensions.
- measures
- Type: String
- Comma-separated list of up to 5 measures, such as TotalSales__c, to project. If unspecified, this parameter includes all of the available measures.
- filters
- Type: String
- Comma-separated list of equality expressions within square brackets, for example, [FirstName__c=DON].
- fields
- Type: String
- Comma-separated list of up to 50 field names that you want to include in the result, for example, Id__c,FirstName__c,GenderId__c,Occupation__c. If unspecified, Id__c is returned.
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–4,999. If unspecified, the default value is 100.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- orderby
- Type: String
- Sort order for the result set, such as GenderId__c ASC,Occupation__c DESC. If unspecified, items are returned in the order they are retrieved.
Return Value
queryProfileApi(dataModelName, id, ciName, searchKey, dimensions, measures, filters, fields, batchSize, offset, orderby, timeGranularity)
API Version
54.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryOutput queryProfileApi(String dataModelName, String id, String ciName, String searchKey, String dimensions, String measures, String filters, String fields, Integer batchSize, Integer offset, String orderby, String timeGranularity)
Parameters
- dataModelName
- Type: String
- Name of the data model object, for example, UnifiedIndividual__dlm.
- id
- Type: String
- Value of the primary or secondary key field, for example, John. If unspecified, defaults to the value of the primary key field.
- ciName
- Type: String
- Name of the Calculated Insight object, for example, IndividualChildrenCount__cio.
- searchKey
- Type: String
- If a field other than the primary key is used, name of the key field, for example, FirstName__c.
- dimensions
- Type: String
- Comma-separated list of up to 10 dimensions, such as GenderId__c, to project. If unspecified, this parameter includes all of the available dimensions.
- measures
- Type: String
- Comma-separated list of up to 5 measures, such as TotalSales__c, to project. If unspecified, this parameter includes all of the available measures.
- filters
- Type: String
- Comma-separated list of equality expressions within square brackets, for example, [FirstName__c=DON].
- fields
- Type: String
- Comma-separated list of up to 50 field names that you want to include in the result, for example, Id__c,FirstName__c,GenderId__c,Occupation__c. If unspecified, Id__c is returned.
- batchSize
- Type: Integer
- Number of items to return. Values are from 1–4,999. If unspecified, the default value is 100.
- offset
- Type: Integer
- Number of rows to skip before returning results. If unspecified, no rows are skipped.
- orderby
- Type: String
- Sort order for the result set, such as GenderId__c ASC,Occupation__c DESC. If unspecified, items are returned in the order they are retrieved.
- timeGranularity
- Type: String
- Time range for the measures. Values are:
- HOUR
- DAY
- MONTH
- QUARTER
- YEAR
Return Value
universalIdLookupBySourceId(entityName, dataSourceId, dataSourceObjectId, sourceRecordId)
API Version
54.0
Requires Chatter
No
Signature
public static ConnectApi.CdpQueryDataOutput universalIdLookupBySourceId(String entityName, String dataSourceId, String dataSourceObjectId, String sourceRecordId)