batch apex scheduled apex the bulk api
DESCRIPTION
batch apex scheduled apex the bulk API. Those *!#? Governor limits!. Execution Context. Actual person?. Session!. Person spoofing a person?. Some else’s session. Machine spoofing a person?. No Session! What the heck?. Batch Apex. - PowerPoint PPT PresentationTRANSCRIPT
batch apexscheduled apexthe bulk API
Those *!#? Governor limits!
Execution ContextActual person?
Machine spoofing a person?
Person spoofing a person?
Session!
No Session! What the heck?
Some else’s session.
Batch Apex• long-running database operations on the force.com platform
• Abstracts the developer from batching
• Fresh contexts to avoid governor limits!
Batch Apex cont…
Batch Apex Simple Example
More Batch Options!global class SuperBatch implements Database.Batchable<sObject>, Database.Stateful, Database.AllowsCallouts {
}
Database.Stateful• Maintain state across transactions.• If you don't specify Database.Stateful, all static and instance member variables are set back to their original values.
Database.AllowsCallouts• Allow HTTP requests
Scheduled Apex
Scheduling Options
• Cron Job Style or
• User Interface
Cron Job
User Interface
Schedulable Context• Set as the user who schedules the job• Records say “last modified by” that user• No session id! – Sessions have expiration– Executed in future– No authentication
Schedulable Limits• 100 jobs on the schedule at a time.
Bulk API
Bulk API client options• Wizard Demo
Bulk API client options cont…• Data Loader
Bulk API Formats• CSV or XML
Bulk API Binary AttachmentsZip File Containing:
Thanks!@danieljpeter