Newer Version Available
Run, Schedule, and Sync Einstein Analytics Data with REST APIs
Start and Stop a Dataflow Job or Recipe
You can use REST APIs to automate the start of a dataflow job or recipe to load data into datasets. This API is the equivalent of the "Run Now" functionality in the Data Manager. You can also stop the job while it’s running. Dataflow jobs include dataflows defined in wave/dataflows and recipes defined in wave/recipes.
- Start a Dataflow Job or Recipe
-
Use the /wave/dataflowjobs endpoint with a POST request to start a dataflow pr recipe. In the POST request body, use the dataflowId parameter to specify the dataflow to start. For a recipe, use the targetDataflowId value for the dataflowId.
The POST request returns a DataflowJobRepresentation.
Note: When you run a dataflow or recipe using this method, the data sync of associated objects runs automatically, if the sync has not previously run or has been updated since the last run.
- Stop a Dataflow Job or Recipe
-
Use the /wave/dataflowjobs/<dataflowjobId> endpoint with a PATCH request to stop a specific dataflow job. The PATCH request uses the dataflowjobId request parameter to specify the dataflow job to stop.
Explore Dataflow Job Nodes
You can use REST APIs to describe and explore each node of a dataflow job. This includes nodes for standard dataflows and for recipes.
- View All Dataflow Job Nodes
-
Use the /wave/dataflowjobs/<dataflowJobId>/nodes endpoint with a GET request to list the nodes.
The GET request returns a DataflowJobNodeCollectionRepresentation.
Note: This request only works for dataflow jobs with ids starting with 030, 03C, or 0eP. If the dataflow job id starts with 030, the result is an empty collection.
- View a Single Dataflow Job Node
-
Use the /wave/dataflowjobs/<dataflowJobId>/nodes/<nodeId> endpoint with a GET request to view the details of a single dataflow job node.
The GET request returns a DataflowJobNodeRepresentation.
Schedule Dataflows, Recipes, and Data Syncs
You can automate dataflows, recipes, and data syncs to run on a time-based schedule by hour, week, or month, on specific days of the week, or dates in the month via the Analytics REST API. For example, schedule a dataflow to ensure that the data is available by a particular time or to run the job during non-business hours. Use the assetId request parameter to specify the data asset type to schedule.
You can also set an event-based schedule to run a dataflow or recipe after the Salesforce Local connection syncs. Set an event-based schedule if the dataflow or recipe extracts data from Salesforce objects that have to sync before the dataflow or recipe runs. The event-based schedule applies to dataflows and recipes only and is not currently available for data syncs.
- Schedule a Data Asset
-
Use the /wave/asset/<assetId>/schedule endpoint with a PUT request to schedule a data asset. The following are examples for the different types of schedules that can be set in the request body.
Set Hourly Schedule - request body example
This request body sets a time-based schedule that runs hourly every day from 2:30am America/Los Angeles, every 3 hours, and stops queuing at 8:00pm.
Set Weekly Schedule - request body example
This request body sets a time-based schedule that runs weekly on Mondays and Thursdays at 12:45am America/Los Angeles.
Set Monthly Specific Schedule - request body example
This request body sets a time-based schedule that runs monthly on the 1st, 15th, and 31st at 12:00am America/Los Angeles.
Set Monthly Relative Schedule - request body example
This request body sets a time-based schedule that runs every month on the last Sunday at 12:00am America/Los Angeles.
Set Event-Based Schedule - request body example
This request body sets an event-based schedule that runs a dataflow after the Salesforce Local connection syncs. Event-based schedules are not supported for Data Connections.
The PUT request uses the assetId request parameter to specify the dataflow, recipe, or data sync to schedule.
The PUT response is empty unless there is an API error.
The DELETE request uses the assetId request parameter to specify the dataflow, recipe, or data sync schedule to delete.
Sync Data Connections
Use the Analytics REST API to automate syncing connected data from your local Salesforce org or external data sources. Synced data is stored as objects that can be used in dataflows and recipes. This API is the equivalent of the "Run Now" functionality in the Data Manager.
- Data Sync Run Now
- Use the/wave/dataConnectors/<connectorIdOrApiName>/ingest endpoint with
a POST request to start a data sync. Execute the POST to the URL with an empty request
body.
The POST request uses the connectorIdOrApiName request parameter to specify the data sync to run.
The POST request returns a RestoreDatasetVersionRepresentation.