Importing a project and scheduling an analytic

After you develop a script in Analytics, use the server-based processing power of Analytics Exchange to schedule and run the script.

What do you need?

To complete this quick start, you need the following:

  • an installation of AX Client with a working connection to an AX Server instance
  • an installation of Analytics with the same edition (Unicode or non-Unicode) as your Analytics Exchange installation
  • access to the sample data that comes with Analytics

    Note

    By default, the sample data projects are installed at C:\Users\username\Documents\ACL Data\Sample Data Files on your local file system.

Create a destination folder in the Working directory

Start by creating a destination collection and folder in the Working directory of AX Server. A collection is a high level container for project folders in Analytics Exchange:

  1. In AX Client, in the Server Explorer, right-click the Working directory and select New > Collection.

    Name the collection something meaningful so that your projects and audit content are easily found in AX Server.

  2. In the Server Explorer, right-click the new collection and select New > folder.

    This folder is the target for your project import, so use a name that identifies the source Analytics project.

Prepare the Analytics project for import

Next, create an analytic script in an existing Analytics project so that you can import the project into the folder you created on AX Server:

Open the sample Analytics project

  1. Open ACL for Windows
  2. Click Open Analytic Project and from the ACL Data\Sample Data Files folder, select Sample Project.ACL.

Create an analytic script

To allow an Analytics script to run on AX Server, you must add an analytic header:

  1. From the Overview tab of the Navigator, right-click Scripts and select New > Script.

    Name your script analytic_test.

  2. In the Script Editor, add the following content to the script and then save the file, close the project, and exit ACL for Windows.
COMMENT
//ANALYTIC Sort the Demo table
This analytic sorts the Demo table on Amount descending
//DATA Demo_Sorted
END

SET SAFETY OFF

OPEN DEMO

SORT ON Amount D TO "Demo_Sorted.FIL"

CLOSE DEMO

SET SAFETY ON

Tip

The analytic header (lines 1 to 5) is required to convert a script to an analytic and allow it to run on AX Server. Without this header, the script would not be an analytic.

Import the project to AX Server and schedule the analytic

Finally, import the prepared Analytics project into AX Server and schedule the analytic you created to run at a specific time on a specific day:

Import the project

  1. In AX Client, in the Server Explorer, right-click the folder you created and select Import.
  2. Browse to the ACL Data\Sample Data Files folder, select Sample Project.ACL, and click Open.
  3. In the Select Import Destination dialog box, select Import source data files (.fil files) and click Import.

Result the project is imported to the target folder and appears in the Analysis Apps sub-folder. The project's tables appear in the Data sub-folder.

Schedule the analytic job

  1. In the Server Explorer, inside the folder you created, right-click Analysis Apps > ProjectNameAnalyticName and select Schedule.
  2. To schedule the analytic to run once at a specified time, in the Schedule dialog box:
    1. Select a date and time to run the analytic.
    2. From the Repeat list, select Do not repeat.
  3. Click Next and then click Schedule.

Result the analytic is scheduled and will run on the day and time you specified.

Analytics Exchange 14.1 Client Help