How do I set up Data-Driven Schedules for Tableau Reports in ATRS?

A data-driven schedule allows you to drive all variables of your reporting requirements (parameters, destinations, output formats, etc.) from database tables and queries at run time.

Data-Driven Schedules for Tableau Reports.

Utilizing a data-driven schedule empowers you to customize all aspects of your reporting needs, such as parameters, destinations, and output formats, directly from database tables and queries during execution. You have the flexibility to incorporate static text and default values as desired. Data-Driven schedules offer versatility for various scenarios.

Here are some examples:

  • Distribute a report to a fluctuating list of recipients. For example, you can distribute a report throughout a large organization where recipients vary from one month to the next, or use other criteria that determines group membership from an existing set of users. E.g. select * from mytable where firstname = ‘john’ will generate the report and distribute only for records where the recipient’s first name is John.
  • Filter the report output using report parameter values that are retrieved at run time. For example, the parameter value returned from the table for Last Name will be “Doe” for John Doe and “Smith” for John Smith.
  • Determine the delivery type and report format dynamically at run time. For example, John Smith gets the report as a PDF file by email with a customized email body and John Doe gets the report as an excel spreadsheet by FTP upload to his web server.

The following simple example will illustrate the process of creating a Data-Driven Schedule.

Scenario: You have a report which has a large number of parameter and destination combinations. Representing the combinations in a table may look something like the example below (Yellow = parameters)

Crystal Reports: Data Driven Example in CRD.

  • You need to have the report run once for each record. The parameter values entered in the table above should populate the parameters in the report and the report should be delivered to the destinations shown in the table.
  • Please note that with the above data when the schedule runs, the following will occur:
  • John Doe will receive only one email for the reports from sectors 1 and 3. He will also get the reports from sectors 2, 3 and 34 delivered to his reports disk location.
  • Peter Crimble will have his report printed on the Printer he specified.
  • Jorge Minola will have a copy of his report sent to John Doe to the disk location he specified and a copy uploaded to his FTP server and folder.
  • Anil Maharaja will receive an email as requested.
  • John Wu will have his report delivered to his email and FTP server as requested.

How do I create Data-Driven Schedule for Tableau Reports?

 

Step 1: Navigate to Data-Driven Schedule

Data Driven Bar

The following screen will be displayed for you to create a Data Driver.  

The Data Driver is where you set up the source for data for your data driven reports. If your data source or data selection criteria changes this is where you will need to make any required changes.

Step 2: Begin building the Data Driver, do this by choosing a ODBC DSN Name from the Dropdown list.


Get values from databaes


We strongly recommend System DSNs so that the DSN is visible to ATRS even when the user associated with the DSN is logged off.

All communication to databases (including Access databases) is done through ODBC, so you must setup a system DSN to the database before you can use this facility.

When setting up DSNs we recommend (if possible) that you use Windows Authentication (Trusted Connection). This ensures that your username and password are not required to be stored in ATRS (more secure) and overcomes a large number of security restrictions which Windows places on DSNs. When using Windows Authentication, make sure that the ATRS NT service user (or background application service user) has full rights to the database otherwise, though you will connect when you are logged in, automated scheduling will fail if the Service user has not got rights to the database.

When setting up a DSN to a SQL server, you must ensure that the "Default Database" setting is set to the database you are connecting to (Windows defaults this to "Master").

Step 3: Enter the UserID and Password ATRS should use to log on to the database.

Step 4: Click Connect to connect to the Database.

Step 5: Once connected select the table from the database that holds the required data. You can refine your selection query by using the simple or advanced tabs.

Step 6: Click on Parse to view the results of the query.

For more information of "Get Values From Database" interface, [click here].

Step 7: Click OK to save the Data Driver information

Data Driver Data Driven-1

If you wish to edit the data selection criteria you may click Build to return to the Build Data Driver tool.

Step 8: Enter a Key Column value,  the key column for the data that is returned for the reports. The information that drives the schedule is required to have a key column so that each row in the table is uniquely identified by the value in this column. The key column is there as an identifier which is used to troubleshoot in cases where there is a problem with one of the records.

Step 9 (optional): Use up to  X threads to run this schedule.  If this option is visible you may choose to run a schedule using multiple threads.  By checking this option will allow more then one report in a package to be executed at the same time rather than concurrently.

Step 10 (optional): If you wish reports that are being delivered to the same email address to be sent in one email as opposed to several different emails, them check the Group reports by email address. Please note that enabling this option disables the ability to embed the reports in the email body for email destinations.

Step 11: Click Next to continue to the next wizard section.

Step 12: Complete the General Section of the Wizard.  Firstly give the Schedule a Name


General Wizard

General Wizard

Step 13 (Optional):  You may change the Create In folder or accept the default.  The Create In folder is the Parent folder where you wish the schedule to be stored. These are ATRS specific folders.  To select a different folder click on the (...) button to the right of the window.

Step 14: Select a Tableau Account from the dropdown that will be used to Access the Reports.  The Tableau Account should have already been linked in Integrations.

Step 15: Choose an Item Path from the dropdown, this is the report that is going to be scheduled.

Step 16 (Optional): You may enter a Description.  A Description may help others identify the use of the schedule. 

Step 17 (Optional): Enter some keywords which can be used later by Smart Folders to identify this schedule.

Step 18: Click  Next to move to the scheduling Tab of the Wizard.


Step 19 Scheduling: Choose when the report will execute. There are a variety of options and if none of them suit you may create your own scheduling frequency using Custom Calendars.  For a full explanation of each of the scheduling options review the Scheduling Article.

 

Schedule wizard


Step 20 Destination:   In this section, you will decide where your schedule will be delivered. To see a complete list of available destinations click Add.  You may add as many destinations to the schedule as  you like.  You can organize the various destinations’ order by clicking on the green up and down arrows.

Destination Wizard

  • Add: Click here to add a destination. 

Destination Dropdown

  • Edit: Select a destination and click to edit it's properties. Or simply double-click on the destination.
  • Delete: Select a destination and click this button to delete it.
  • Import: Click here to import from the list of default destinations.
  • For more information about Type of Destinations, click [here].
  • For more information about Output Formats, click [here].

For email and disk destinations on a Data Driven schedule, there is now the added ability to have them processed instantly instead of being processed at the end of the schedule. 

Deliver Destination Check

Customizing the Destination

With the Data Driven Schedule, you can determine the delivery method of your report based on your data. In your table, specify the delivery method by creating a column for each delivery type (FTP, SharePoint, Email etc.). For each record specify their email, fax number, and so on.

Crystal Reports: Data Driven Example in CRD.

Tip: For email destinations, simply add a semicolon after an email address to send the same instance of the report to another email address.

  • Data driving the Report's Distribution
  • As mentioned above, ATRS will pull delivery data from your database.
  • In this example, we will be using email addresses found in the table.
  • With [Data Driven inserts], simply drag and drop the field that indicates your desired destination (email in this case).

Email insert data driven

 ATRS will deliver a unique report based on a corresponding email address.

Customize Recipient Messaging

You can also customize the messaging the recipient receives. Using Data Driven Inserts, ATRS will automatically pull data from your table and use it to customize the subject, body or report format.

Email insert 2-1

 

Simply drag and drop fields from your table to the desired position.

For example, to customize an email greeting, type the greeting, and add the recipients name as shown above.

Step 21: Click Next to continue to the next wizard section.

Step 22: Report Settings, if you need to make any changes to the Export Report settings you would make the changes here.

Report settings

Step 23 Report Parameters: In this section, you will determine the parameters for your report.  Drag and drop your [Data-Driven inserts] into the desired parameter fields. If you do not wish to enter a data-driven value in your parameter, you can still manually type a value.


Parameters


Repeat this process for all the parameters in your report.

    Step 24: Click Next to continue to the next wizard section.

    Step 25 Exception Handling:  In this section you will determine what should happen should ATRS encounter an exception while executing any of the schedules. For more information about Exception Handling please review the Exception Handling Article

     

    Exception Handling Data Driven

      Step 26 Custom Tasks: In the section you have the option of setting up custom tasks. Custom tasks are business process automation tools that can be auto triggered before or after a report runs.  With Data Driven Schedules you have the option to run them for each generated report or for the entire schedule.  For more information on Custom Tasks, [click here]


      Custom Tasks

      Step 27: Once you have finished setting up Custom Tasks, or if you have no Custom Tasks to set up, you must click on Finish to complete and save the Schedule.

      Data-Driven Schedule Context Menu

      Context Menu Data Driven

      • Right-Click on a schedule to see the following actions:
      • Properties: Edit the schedule from here. Or you can just double click on the schedule.
      • Copy: Use this to copy the schedule. Right-click in the "white space" of the folder you wish to copy it to and select Paste button.
      • Paste: Paste a previously copied schedule.
      • Rename: Rename the package.
      • Enabled: Schedules are enabled when there is a check icon beside this option. To stop a schedule from running, or to "pause" it for a while, select this option to remove the check icon. Disabled schedules will not run until they are enabled again.
      • Move: If you want to relocate a Schedule to another Parent Folder, you can utilize this feature to do so.
      • Preview: Preview the report before execution.
      • Execute: This button will execute the schedule immediately. Note that the next run date and time is not moved on as a result of a manual execution. They only move on if the schedule is run automatically by one of the schedulers.
      • Delete: Selecting this option will delete the schedule.
      • Execute On: Use to option to execute the schedule to another collaboration server. 
      • Tools - Generate Script: This feature generates a SQL script, allowing you to copy a schedule from one instance of the software to another for seamless replication.
      • Tools - Convert To Package: This button will convert this report into a package. The package will have the name of the single schedule report.
      • Create Shortcut: Use this option to create a shortcut you can save in any location on your PC. Execute the shortcut to execute the schedule in ATRS.

      Data Driven Schedule Properties

      Properties Menu

      To access the properties of your schedule, simply right-click on the schedule and choose the "Properties" option. From the properties menu, you can make edits to the schedule settings, view the Schedule History, and even share schedules with other users.


      General Wizard