Audit Command Language – Workspaces

Welcome to ‘Audit Command Language Tutorial for Beginners’ series. Most seasoned analytics professionals often complain that there are better tools that ACL to perform analytics on data sets. In most scenarios, this is a fair complaint against the ACL tool. However, if there is one feature that sets ACL apart from others is the ‘Workspace’. The ‘Workspaces’ in ACL are kind of a short cut to scripting when required to create the new fields. Simply define the required fields in the ‘Workspace’, select the table and activate the ‘Work Space’. You can then simply add the new columns via scripting or the GUI.

Creating a Workspace

Simply right click in the ‘Project Navigator’ on the left of the program. Select New -> Workspace and rename the new Workspace appropriately.

work-space-step-1                   work-space-step-2

Scripting the Workspace

After creating the workspace, you need to write a script for the new column to be created in any existing table. Consider the sample script to create a new field ‘New_Gender’ from an existing field ‘Field_1’. The script in the work space would be

New_Gender                            Computed

See below:

Activating the Workspace

Save the script in the workspace. Open the target table, right click on the workspace icon in the Project Navigator and click ‘Activate’. If you receive no pop-up, that implies the script in the workspace is correct and the new field is available to be added in the selected table. See image below

As you can see, the table ‘sample’ is selected the workspace is activated. Next, press ‘CTR + i’ to see the list of fields in the table. The newly created field would be present in that list.

To add a new column to the table using GUI, simply right-click on any column header in the table and select add column. Follow steps in the next windows and you’re done.

Going off the above example, imagine the possibilities of leveraging the same workspace to work on different tables. Essentially, the workspace is acting as complimentary scripts to the main scripts. It is for this reason, that in most script structures in ACL Audit Command Language, fields are not defined in the main body and certainly improves the performance of a project.

Audit Command Language – Data Issues

Welcome to the ‘Audit Command Language Tutorial for Beginners’. At this stage, we have discussed how to import delimited files and excel files into ACL projects to perform analytics. The next step is to perform checks to ensure that the data is imported correctly. There are two most common kinds of issues that are seen while importing data into any tool.

  1. Data Spill: This type of data issue causes the data to spill over into the next columns. This generally happens because there may be extra delimiters in some field (generally, this would happen in fields which are descriptions). In the screenshot below, the third line has an extra delimiter.
  2. Data Split: The second most common data issue is the splitting of data lines. This issues causes the data lines to be split across 2 or more lines in the raw file. The same would be reflected in the imported table in ACL. The screenshot below illustrates such an issue. The 6 line in the file has a new line character which is causing the data lines to be shifted to the next line.

Simply having the knowledge of such issues is not enough if these can’t be identified. After all, it is impossible to locate such issues in large files when working on a live project. The fastest way to identify these issues after import are as follows:

  1. Classify Command: In most kinds of data files, certain data columns have a certain set of unique values or similar looking values. For example, a data column like ‘Payment_Mode’ would only have a few possible values like ‘Card’, ‘Cash’ etc. Using the classify command on such a column, should have such values only. If there are any other values, go to the data lines with these values and verify those in the raw data file.
  2. Summarize Command: The summarize command works like the classify command to provide unique values in a column. However, along with the unique values in the column, the summarize command also provides information of the total line counts for each of the unique value and even subtotals for any numeric fields in the data. This information can be further used to locate any problem lines.

You can refer to the ACL Audit Command Language Help for more details on the syntax for these commands. There would be dedicated posts and videos detailing the use of the above statements.

There are some other techniques that you may leverage to identify such issues. There are some helpful tips in the videos below:

Data Spills

Data Split

There are a number of issues that can occur when importing data files. Now that you are aware of the most issues and how to locate the same, you can investigate your data imports for accuracy. This is probably the most tedious exercise, but also the most important, as incorrectly imported data would affect the outcome of the analytics performed.

Please keep practicing and feel free to reach out to us with your valuable feedback and comments. Please go to the website to review ACL script examples and ACL script commands sign up for our newsletter, so that we may keep you posted on the latest activity on our website and Youtube channel.