Tasks

Overview

Tasks allow users to do additional steps to their data within the integration process. Tasks are available within the Tasks section and also easily accessible for use in the Workflow section and Workflow Wizards. The Tasks section features:

Clear Sage Intacct Collector Bookmark

Clear Salesforce Collector Bookmark

Erase Data

Erasing Data is available in Adaptive via DataBlend. 

Please note that the Erase Data Task is permanent and that once data is erased it is unable to be retrieved.     

Configuration

Setting

Required/ Optional 

Description 

Name

Required

Select free text. This will be the name of your new Task.

Type

Required

Select Erase Data

Credential

Required

Select Adaptive credential from the list.

Plan or Actuals

Required

Select Plan or Actuals.

Plan Version Name

Required

Include free text as a descriptor. Users can utilize this to easily identify different plan versions .  

Account Type

Required

Select GL, Custom, or Cube.

Start

Required

Select Start Date from the drop-down menu.

 

Please note that start date is able to be parameterized via the options tab next to start.

End

Required

Select Start Date from the drop-down menu.

 

Please note that end date is able to be parameterized via the options tab next to end.

Include Cell Notes

Optional

Enable or disable the Include Cell Notes toggle.

Filter Mode

Optional

Select None or Manual.

 

Delete SFTP Files

 

Setting

Required/ Optional 

Description 

Name

Required

Select free text. This will be the name of your new Task.

Type

Required

Select Delete SFTP Files

Use Local SFTP Credential

Optional

Enable the toggle to use a local sftp credential.

Credential

Required

Select credential from drop-down menu.

Path

Required

Specify the file path.

Regex

Optional

Provide an optional regex for file matching.

Before Parameter Name

Optional

Provide an optional date parameter name (relative or date) to match last modified date.

Dry Run

Optional

Enable the Dry Run toggle to do a dry run and see what file will be deleted.

Please note that this is always encouraged. Once data is deleted a user cannot reverse this. 

 

Please note that the logs will show what options were used and what files were matched/deleted. This is very helpful to confirm the desired data has been deleted.

 
Purge Streams
 

Setting

Required/ Optional 

Description 

Name

Required

Select free text. This will be the name of your new Task.

Type

Required

Select Purge Streams.

Data Source

Optional

Enter the data source to which the schema a user is wishing to purge streams is found.

Schema 

Required

Select the schema from the drop-down menu. The schema used to determine which streams to purge.

From Parameter

Optional

Enter the name of the parameter used to determine the start of the range of streams to be purged.

If From Parameter is left blank there will be no minimum on the range of streams selected. If From Parameter is blank the created date of the schema will be shown. Parameter names are used so static dates, relative dates and custom dates can be easily mixed and used and overridden from workflows.

To Parameter

Optional

Enter the name of the parameter used to determine the end of the range of streams to be purged.

If to Parameter is left blank all streams up to the current date will be purged. If To Parameter is left blank the value “now” will be shown. Parameter names are used so static dates, relative dates and custom dates can be easily mixed and used and overridden from workflows.

Dry Run

Optional

Enable the toggle to run the task as a dry run. If enabled, no streams will actually be purged. Logs will show how many streams were found. This is encourage every time a purge streams task is created. Purged data cannot be retrieved. 

 

Please note that purging streams is irreversible. All data purged will be lost permanently.

 
Run Scripts

DataBlend supports users wishing to create custom scripts within the DataBlend Script Task. The DataBlend Script Task is a unique connector in that the connection is established within the DataBlend application and collects data from other DataBlend Collectors using arbitrary JavaScript with tie-ins to .NET with the help of jint. Any asynchronous methods should use .Result to wait for the method to complete. Establishing the connection is simpler than other DataBlend connections as this Task does not require a Credential to be created first. To learn more about the DataBlend script feature please visit Script Collectors or Script Data Targets.

Configuration

Setting 

Required/ Optional

Description 

Name

Required

Select free text. This will be the name of your new Task.

Type

Required

Select Run Script

Script

Required

DataBlend supports a variety of scripts tasks within the DataBlend platform.

 

Get Query Results

 const getMostRecentQueryExecutionByQueryId = (id) => {

    const search = importNamespace('Datablend.Search');
    const models = importNamespace('Datablend.Api.Models');
    const QueryExecutionSearch = search.Search(models.QueryExecution);
    const OrderList = System.Collections.Generic.List(search.Order);

    let executionSearch = new QueryExecutionSearch();
    executionSearch.Limit = 1;
    executionSearch.Orders = new OrderList();
    executionSearch.Orders.Add(search.Order.Descending('created'));
    executionSearch.Predicate = search.Predicates.Junction.And(search.Predicates.Property.EqualTo('parent.id', id), search.Predicates.Property.EqualTo('state', 'Complete'));
    executionSearch = QueryExecutions.Search(executionSearch).Result;

    return executionSearch.Results[0];
};

const getRecordsFromQueryExecution = (id) => {

    const sys = importNamespace('System');
    const global = importNamespace('System.Globalization');
    const io = importNamespace('System.IO');
    const csv = importNamespace('CsvHelper');

    const stream = QueryExecutions.Results(new sys.Guid(id)).Result;

    const streamReader = new io.StreamReader(stream);
    const csvReader = new csv.CsvReader(streamReader, global.CultureInfo.InvariantCulture, false);

    return csvReader.GetRecords(new sys.Object().GetType()).ToList();
}

const queryId = '21234546-c122-4a16-99fe-41234567892272';
const queryExecution = getMostRecentQueryExecutionByQueryId(queryId);
const records = getRecordsFromQueryExecution(queryExecution.id);

log(records[0].first_name);
 

Delay

The delay task is simple yet unique task available within the DataBlend platform. This task can be applied in many ways. Users can now specify anywhere from 0-60000 ms (up to one minute).

Clear Salesforce Collector Bookmark

The Clear Salesforce Collector Bookmark is simple yet unique task available within the DataBlend platform. The Clear Salesforce Collector Bookmark will remove a bookmark from one specific Salesforce Collector. Please note that removing the bookmark is a permanent action. The user will need to add the bookmark to the specific collector again.
 

Clear Sage Intacct Collector Bookmark

The Clear Sage Intacct Collector Bookmark is simple yet unique task available within the DataBlend platform. The Clear Sage Intacct Collector Bookmark will remove a bookmark from one specific Sage Intacct Collector. Please note that removing the bookmark is a permanent action. The user will need to add the bookmark to the specific collector again.

Details

The details section documents who the Task was created and updated by and the corresponding times. This allows for easy tracking of multiple Tasks.

Latest Execution

The latest execution section documents the state of the Task, created time, and status of the Task. States include complete, cancelled, and error.

Logs

Job logs are easily accessible via the state link in the Latest Execution section. Click the linked state and the user is taken to the Executions section. Here users view items, details and logs related to the ran job. Logs are downloadable via the download log button indicated at the top right of the log section. Logs are useful to see how much data was collected, the steps taken, and the time in which it occurred.

Executions

The executions section documents when the Task was created, started, completed and the total amount of data scanned. The status includes information regarding the state of the Task. This allows for easy tracking of multiple Tasks.                                                                                

Creating a Favorite

Creating a favorite is simple. Users may favorite a Credential, Collector, Data Target, Query, Data Source, or Workflow. To create a favorite, users navigate to the star icon on the upper left next to Edit.

Please note that users cannot favorite an Unpivot, Data Quality Report, Schema, Agent or Notification.

Saved Views

Saved views are a unique feature offered by DataBlend that allow users to quickly view filtered searches. Setting a saved view is simple. Click the gear icon in the upper right corner. A drop-down will appear with option to save the current view, restore the default view, or copy share URL. Copying a Share URL will allow other users with the URL to view the same saved view.

 

Want to see more? Visit our helpful demo page or attend an office hour. Demos