Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
DataCloudExportScheduler Class
The data cloud process prepares the data in the processing service which can be retrieved later by data cloud to the platform. This implements System.Schedulable interface and typically scheduled every 24hrs. This Apex class has one method and two constructors.
Signature of the Method
global voidexecute(SchedulableContext sc)
This method is overridden for the System.Schedulable interface. It calls the processing service to prepare processing service tables for Data Cloud.
Parameters
- sc: SchedulableContext
- A platform class instance provided by the Salesforce platform when the class is scheduled via Apex.
new cgcloud.DataCloudExportScheduler()
This is a no-parameter constructor. It prepares all available tables for Data Cloud in the processing service.
DataCloudExportScheduler(List<String> tables)
Constructs the scheduler to prepare specific tables for Data Cloud.
- Parameters
- tables: List<String> - Represents the tables the customer wants to have in Data Cloud. Currently available tables include promotionmeasures, paymenttacticmeasures, dailymeasurereal, and dailymeasureint .
Usage Example
This example shows how to schedule the DataCloudExportScheduler.
1cgcloud.DataCloudExportScheduler cgDataCloudScheduler = new cgcloud.DataCloudExportScheduler();
2// Example: Schedule to run daily at 11 AM
3String cronExp = '0 0 11 * * ?';
4String jobID = System.schedule('CgDataCloud', cronExp, cgDataCloudScheduler);
5
6// To schedule for specific tables:
7// List<String> specificTables = new List<String>{'promotionmeasures', 'dailymeasurereal'};
8// cgcloud.DataCloudExportScheduler specificTableScheduler = new cgcloud.DataCloudExportScheduler(specificTables);
9// String specificJobId = System.schedule('CgDataCloudSpecific', cronExp, specificTableScheduler);