Documentation Center

Archive reporting tables

Project archiving allows you to write reports on historical data. Archiving is the process of copying historical data into new database tables, specifically so that you can write reports and get answers to your questions.

The archive data store contains information about projects, tasks, and scoping, which is maintained indefinitely. You can write complex, dynamic reports answering questions such as:
  • How many projects were created in each of the last 12 months?
  • What was the average time for a translation project?
  • Which vendors had the fastest turnaround time?
  • How many active projects and tasks were there on each day over the last two months?
During the life of an active task, the workflow engine sends a message to initiate copying information related to the task to an archive table. Until the general cleaner deletes the original task information, it will appear in two places – in its original table and in the archive table. This also means that an active project with at least one completed task appears in the archive. Each project is updated as its tasks complete, so that the final version of the project which appears in the archive is its state when its final task was completed. The archive tables are mostly a mirror copy of the existing tables. The archive tables have some of the same columns as the main WorldServer tables, but some client-related data, such as Client ID and Name, are not available in the reporting schema.
Note the following when working with tasks and archiving:
  • When a task is canceled, it remains in the tasks table until garbage collection runs.
  • When a task is completed, it also remains in the tasks table for at least 30 days (default). After 30 days, it can be removed during garbage collection.

    It does not matter if a task is canceled or completed; it always remains in the tasks table. The general cleaner removes it from the tasks table after a configured number of days. The TaskDeleteAfterDays property configures the default amount of time a task remains in the tasks table.

  • A task is always archived after it is completed successfully, even if the project with which the task is associated is not completed. Therefore, a completed task can coexist in the tasks table and the archiveTasks table for a period of time, until garbage collection runs.
  • Archive tables are never included in garbage collection.

    Use the spDeleteArchive stored procedure to clean up archive tables manually.

In summary, the archive tables provide historical information about work that has been performed in WorldServer. Initial project information is added to these tables when projects are created; task information is added on the successful completion of each task. Information is never removed from the archive tables automatically. Unless end users choose to remove old information from these tables, they will store historical information forever.

archiveProjectGroups

Historical information about WorldServer Project Groups.

ColumnTypeDescription
projectGroupIdintegerThe internal ID of this Project Group. Primary key
namestringThe name of this Project Group.
descriptionstringThe description of this Project Group (optional).
workgroupIdintegerThe internal ID of the Workgroup with which this Project Group is associated.
workgroupNamestringThe name of the Workgroup with which this Project Group is associated.
creationDatedateWhen this Project Group was created.
dueDatedateWhen this Project Group is due.
completionDatedateWhen this Project Group was completed. Not set if the Project Group is still active.
creatorIdintegerThe internal ID of the user who created this Project Group.
creatorNamestringThe username of the user who created this Project Group.
typeintegerIgnored.
sourceLocaleIdintegerThe internal ID of the source Locale for this Project Group.
sourceLocalestringThe name of the source Locale for this Project Group.

archiveProjects

Historical information about WorldServer Projects.

ColumnTypeDescription
projectIdintegerThe internal ID of this Project. Primary key.
namestringThe name of this Project.
descriptionstringThe description of this Project (optional).
localeIdintegerThe internal ID of the target Locale for this Project.
localeNamestringThe name of the target Locale for this Project.
workgroupIdintegerThe internal ID of the Workgroup with which this Project is associated.
workgroupNamestringThe name of the Workgroup with which this Project is associated.
creationDatedateWhen this Project was created.
dueDatedateWhen this Project is due (optional).
completionDatedateWhen this Project was completed. Not set if the Project is still active.
creatorIdintegerThe internal ID of the user who created this Project.
creatorNamestringThe username of the user who created this Project.
typeintegerIgnored.
lastTaskNumintegerThe task number given to the last task in the project. This is ordinarily the same as the number of tasks in the project.
projectGroupIdintegerA foreign key into the archiveProjectGroups table, identifying the Project Group that this Project is part of.
activeTasksintegerThe number of active Tasks in this Project.
completedTasksintegerThe number of completed Tasks in this Project.
canceledTasksintegerThe number of canceled Tasks in this Project.
totalTasksintegerThe total number of Tasks in this Project, regardless of state.
rfqIdintegerThe internal ID of the Quote for this Project.
rfqNamestringThe Quote name for this Project.
clientIdintegerThe internal ID of the Client for this Project.
clientNamestringThe Client name for this Project.
projectTypeIdintegerThe internal ID of the Project Type for this Project.
projectTypeNamestringThe Project Type name for this Project.
costdoubleThe total cost for the project, as calculated by applying the associated Cost Model. Not set until the project is completed.
adjustmentdoubleA manual adjustment to the project cost (optional).
vendorNotesstringVendor notes related to the cost adjustment (optional).
customerNotesstringCustomer notes related to the cost adjustment (optional).
costModelArchiveIdintegerA foreign key into the archiveCostModels table, indicating the Cost Model associated with this project.
reviewModelArchiveIdintegerA foreign key the reviewModelArchive table, indicating the Review Model associated with this project.

archiveCostModels

Historical information about the translation costs associated with WorldServer Projects.

ColumnTypeDescription
costModelArchiveIdintegerThe internal ID of this Cost Model. Primary key.
nameintegerThe name of this Cost Model.
icePricedoubleThe price of translating each ICE matched word.
repeititionPricedoubleThe price of translating each repetition word.
perfectPricedoubleThe price of translating each word with a perfect (100%) TM match
range1PricedoubleThe price of translating the highest fuzzy match range (for example, 90-100%).
range1MinintegerThe lower boundary of the highest fuzzy match range (for example, 90).
range2PricedoubleThe price of translating the second fuzzy match range (for example, 80-90%). Not set if there are less than two fuzzy match ranges in the associated scoping configuration.
range2MinintegerThe lower boundary of the second fuzzy match range (for example, 80). Not set if there are less than two fuzzy match ranges in the associated scoping configuration.
range3PricedoubleThe price of translating the third fuzzy match range (for example, 70-80%). Not set if there are less than three fuzzy match ranges in the associated scoping configuration.
range3MinintegerThe lower boundary of the third fuzzy match range (for example, 80). Not set if there are less than three fuzzy match ranges in the associated scoping configuration.
range4PricedoubleThe price of translating the fourth fuzzy match range (for example, 60-70%). Not set if there are less than four fuzzy match ranges in the associated scoping configuration.
range4MinintegerThe lower boundary of the fourth fuzzy match range (for example, 60). Not set if there are less than four fuzzy match ranges in the associated scoping configuration.
range5PricedoubleThe price of translating the fifth fuzzy match range (for example, 0-60%). Not set if there are less than five fuzzy match ranges in the associated scoping configuration.
range5MinintegerThe lower boundary of the fifth fuzzy match range (for example, 0). Not set if there are less than five fuzzy match ranges in the associated scoping configuration.
vendorIdintegerThe internal ID of the vendor associated with this Cost Model (optional).
vendorNamestringThe name of the vendor associated with this Cost Model (optional).
scopingConfigIdintegerThe internal ID of the scoping configuration associated with this Cost Model.
scopingConfigNamestringThe name of the scoping configuration associated with this Cost Model.
currencystringThe three-letter currency code for the currency that the prices in this cost model are listed in (for example, USD).

archiveLineItems

Historical information about special charges or discounts on Projects, as calculated by Cost Model Rules.

ColumnTypeDescription
lineItemIdintegerThe internal ID of this Line Item. Primary key.
costModelArchiveIdintegerA foreign key into the archiveCostModels table, indicating the Cost Model this line item applies to.
namestringThe name of this Line Item.
descriptionstringThe description of this Line Item.
costdoubleThe additional charge (or discount, if negative) associated with this Line Item.

archiveTasks

Historical information about successfully completed WorldServer Tasks.

ColumnTypeDescription
taskIdintegerThe internal ID of this Task. Primary key.
projectIdintegerA foreign key into the archiveProjects table, indicating the Project this Task is part of.
workflowIdintegerThe internal ID of the workflow that this Task is flowing through.
workflowNamestringThe name of the workflow that this Task is flowing through.
stepCountintegerThe ordinal step number of the currently active Task Step.
parentIdintegerIf this task is part of a sub-workflow, this is the taskId of the task in the parent workflow that spawned this one. Otherwise, not set.
parentStepCountintegerIf this task is part of a sub-workflow, this is the step number of the currently active Task Step in the parent workflow. Otherwise, 0.
statusintegerIndicates the last event of interest that happened with this Task. One of the following values:
  • 0 - Task was not started
  • 1 - Task is still in progress with success
  • 2 - Task is still in progress with failure
  • 3 - Task was completed with success
  • 4 - Task was completed with failure
  • 5 - Task was canceled.
taskNumInProjectintegerThe ordinal number of this Task in the associated Project.
creationDatedateWhen this Task was created.
dueDatedateWhen this Task is due (optional).
expectedDurationintegerThe number of hours the Task is expected to take to complete (optional).
completionDatedateWhen the Task was completed.
currentTaskStepIdintegerA foreign key into the archiveTaskSteps table indicating which Task Step is currently active
priorityintegerThe priority of this Task.
includeInCostbooleanShould this Task’s cost be included in the total cost for the Project?
sourceAssetstringThe AIS Path of the source asset.
targetAssetstringThe AIS Path of the target asset.
typeintegerIgnored.
costdoubleThe cost for this Task, based on applying the associated Cost Model. Not set if there was no associated Cost Model, or if the task never caused an asset to be segmented.
mtWordCountintegerThe number of words processed by the Task with an MT match.
totalWordCountintegerThe total number of words processed by this Task. Not set if the task never caused an asset to be segmented.
iceWordCountintegerThe number of words processed by this Task with a TM ICE match. Not set if the task never caused an asset to be segmented.
perfectWordCountintegerThe number of words processed by this Task with a 100% TM match. Not set if the task never caused an asset to be segmented.
repetitionWordCountintegerThe number of words processed by this Task with a TM repetition. Not set if the task never caused an asset to be segmented.
range1WordCountintegerThe number of words in the highest fuzzy match range (for example, 90-100%). Not set if the task never caused an asset to be segmented.
range1MinintegerThe lower boundary of the highest fuzzy match range (for example, 90).
range2WordCountintegerThe number of words in the second fuzzy match range (for example, 80-90%). Not set if the task never caused an asset to be segmented.
range2MinintegerThe lower boundary of the second fuzzy match range (for example, 80). Not set if there are less than two fuzzy match ranges in the associated scoping configuration.
range3WordCountintegerThe number of words in the third fuzzy match range (for example, 70-80%). Not set if the task never caused an asset to be segmented.
range3MinintegerThe lower boundary of the third fuzzy match range (for example, 70). Not set if there are less than three fuzzy match ranges in the associated scoping configuration.
range4WordCountintegerThe number of words in the fourth fuzzy match range (for example, 60-70%). Not set if the task never caused an asset to be segmented.
range4MinintegerThe lower boundary of the fourth fuzzy match range (for example, 60). Not set if there are less than four fuzzy match ranges in the associated scoping configuration.
range5WordCountintegerThe number of words in the fifth fuzzy match range (for example, 0-60%). Not set if the task never caused an asset to be segmented.
range5MinintegerThe lower boundary of the fifth fuzzy match range (for example, 0). Not set if there are less than five fuzzy match ranges in the associated scoping configuration.
costModelIdintegerA foreign key into the archiveCostModels table. Indicates the Cost Model associated with this Task. This is equivalent to archiveProjects.costModelArchiveId.
reviewModelIdintegerThe internal ID of the Review Model for this Task.
creatorNamestringThe username of the user who created this task.
scopingConfigIdintegerThe internal ID of the associated scoping configuration.
scopingConfigNamestringThe name of the associated scoping configuration.

archiveTaskSteps

Historical information about each step that was completed during Task processing.

ColumnTypeDescription
taskStepIdintegerThe internal ID of this TaskStep. Primary key.
taskIdintegerA foreign key into the archiveTasks table, indicating the Task this Task Step is part of.
workflowStepIdintegerThe internal ID of the workflow step that this Task Step corresponds to.
claimaintIdintegerThe internal ID of the user who has claimed this Task Step.
claimantNamestringThe username of the user who has claimed this Task Step.
statusinteger
  • 1: This Task Step has not yet started.
  • 2: This Task Step is in progress.
  • 3: This Task Step has been completed.
  • 4: This Task Step has project scope and is waiting to execute.
  • 5: This Task Step has project scope and is in progress.
compTransitionIdintegerThe internal ID of the transition taken from this step when it completed.
transitionNamestringThe name of the transition taken from this step when it completed.
creationDatedateWhen this Task Step was created.
dueDatedateWhen this Task Step is due (optional).
expectedDurationintegerThe number of hours the Task Step is expected to take to complete (optional).
startDatedateWhen the Task Step began executing.
completionDatedateWhen the Task Step was completed.
vendorIdintegerThe internal ID of the Vendor who this step is assigned to.
vendorNamestringThe name of the Vendor who this step is assigned to.
stepNamestringThe name of this step (for example, “Translate”).
stepTypestringThe type of this step (one of Start, Finish, Human, Automatic, Sub-Workflow, Parallel Review, Automatic Error, or Cancel).

archiveTaskHistoryEntries

A record of interesting events with timestamps for historical WorldServer Tasks.

ColumnTypeDescription
taskHistEntryIdintegerThe internal ID of this History Entry. Primary key.
taskIdintegerA foreign key into the archiveTasks table, indicating the Task this History Entry applies to.
theDateDateThe date of a historical event.
eventTypeintegerThe event that occurred, one of the following possible values.
  • 1: Task started
  • 2: Task completed
  • 3: Task canceled
  • 4: Task Step claimed
  • 5: Task Step executed
  • 6: Task Step completed
  • 7: Task Step un-claimed
  • 8: Sub-task started
  • 9: Sub-task completed
  • 10: Task assignees modified
  • 11: Task assets exported
  • 12: Task assets imported
  • 13: Task branched
  • 14: Sub-task canceled
userIdintegerThe unique ID of the user who performed the event, if relevant.
theCommentstringA user-provided comment for the event (optional).

archiveCustomProjectAttributes

Custom attributes and values for historical WorldServer Projects. Attributes with multiple values will have multiple rows in this table for the same attribute and Project.

ColumnTypeDescription
projectIdintegerA foreign key into the archiveProjects table, indicating the Project whose custom attribute this is.
namestringThe name of the custom attribute.
uiNamestringThe UI display name of the custom attribute.
valueStringstringThe string value of the attribute.
valueDatedateThe attribute value as a date. Not set for non-date-valued attributes.
valueNumberintegerThe numeric value of the attribute. Not set for non-numeric attributes.
valueClobCLOBThe attribute value, for attributes that require large amounts of storage (Large Text Area, Comment, HTML attributes).

archiveCustomTaskAttributes

Custom attributes and values for historical WorldServer Tasks. Attributes with multiple values will have multiple rows in this table for the same attribute and Task.

ColumnTypeDescription
taskIdintegerA foreign key into the archiveTasks table, indicating the Task whose custom attribute this is.
namestringThe name of the custom attribute.
uiNamestring.The UI display name of the custom attribute
valueStringstringThe string value of the attribute.
valueDatedateThe attribute value as a date. Not set for non-date-valued attributes.
valueNumberintegerThe numeric value of the attribute. Not set for non-numeric attributes.
valueClobCLOBThe attribute value, for attributes that require large amounts of storage (Large Text Area, Comment, HTML attributes).

archiveCustomCostModelAttributes

Custom attributes and values for historical WorldServer Cost Models. Attributes with multiple values will have multiple rows in this table for the same attribute and Cost Model.

ColumnTypeDescription
costModelArchiveIdintegerA foreign key into the archiveCostModels table, indicating the Cost Model whose custom attribute this is.
namestringThe name of the custom attribute.
uiNamestringThe UI display name of the custom attribute.
valueStringstringThe string value of the attribute.
valueDatedateThe attribute value as a date. Not set for non-date-valued attributes.
valueNumberintegerThe numeric value of the attribute. Not set for non-numeric attributes.
valueClobCLOBThe attribute value, for attributes that require large amounts of storage (Large Text Area, Comment, HTML attributes).

archiveCustomVendorAttributes

Custom attributes and values for historical WorldServer Vendors. Attributes with multiple values will have multiple rows in this table for the same attribute and Vendor.

ColumnTypeDescription
vendorIdintegerA foreign key matching the vendorId column in the archiveCostModels table, indicating the Vendor whose custom attribute this is.
archiveVendorAttributeIdintegerA unique ID.
namestringThe name of the custom attribute.
uiNamestringThe UI display name of the custom attribute.
valueStringstringThe string value of the attribute.
valueDatedateThe attribute value as a date. Not set for non-date-valued attributes.
valueNumberintegerThe numeric value of the attribute. Not set for non-numeric attributes.
valueClobCLOBThe attribute value, for attributes that require large amounts of storage (Large Text Area, Comment, HTML attributes).

periodicWorkStatus

A record of WorldServer activity over time. This table is populated by the special PWS_TASK recurrence, which records periodic snapshots of activity on a schedule.

ColumnTypeDescription
timedateThe timestamp when the snapshot was taken.
activeProjectsintegerThe number of Projects active when the snapshot was taken.
activeTasksintegerThe number of Tasks active when the snapshot was taken.
wordsInActiveTasksintegerThe number of words in assets associated with active Tasks when the snapshot was taken.

archiveReviewModels

ColumnTypeDescription
reviewModelArchiveIdintegerPrimary key.
reviewModelIdintegerThe internal ID of the Review Model.
namestringThe name of the Review Model.
descriptionstringA description for the Review Model.

archiveReviewModelData

ColumnTypeDescription
reviewModelArchiveIdintegerPrimary key.
dataTypeintegerThe data type for the Review Model.
datastringThe data for the Review Model.
displayOrderintegerOrder in display.

archiveTaskReviewErrors

ColumnTypeDescription
archivedTaskIdintegerPrimary key and Foreign key.
errorSeveritystringPrimary key. Severity of error.
errorTypestringPrimary key. The data for the Review Model.
errorCountintegerNumber of errors.

Archive Reporting Schema Diagram

The following figure shows the relationships between the archived reporting tables.

Figure 1. Archive Reporting Tables

Sample Queries

The following examples demonstrate queries you can write against the archive tables.

How many projects were created in each of the last 12 months?

Oracle

SELECT * FROM
   (SELECT to_Char(creationDate, 'MM/YYYY') Month, count(*) Total
   FROM archiveProjects
   GROUP BY to_Char(creationDate, 'MM/YYYY')
   ORDER BY to_Char(creationDate, 'MM/YYYY') desc)
WHERE rownum<=12;

SQL Server

SELECT top 12 Month, count(*) as Total FROM
   (SELECT SUBSTRING(CONVERT(char(10), creationDate, 103), 4, 7) as
   Month
   FROM archiveProjects) projects
   GROUP BY Month
ORDER BY Month desc

What was the average time in hours for a translation project?

Oracle

SELECT 24*sum(completionDate - creationDate)/count(*) as average
FROM archiveProjects
WHERE completionDate is not null;

SQL Server

SELECT sum(DATEDIFF(second, creationDate, completionDate))/3600.0/
count(*) as average
FROM archiveProjects
WHERE completionDate is not null;

How many active projects and tasks were there on each day over the last two months?

Oracle

SELECT to_Char(time, 'MM/DD') Day,
   sum(activeProjects) as activeProjects,
   sum(activeTasks) as activeTasks
FROM periodicWorkStatus
WHERE time > sysdate - interval '61' day
GROUP BY to_Char(time, 'MM/DD')
ORDER BY to_Char(time, 'MM/DD') desc;

SQL Server

SELECT Day,
   sum(activeProjects) as activeProjects,
   sum(activeTasks) as activeTasks
FROM
(SELECT (CONVERT(char(2), Month(time)) + '/' + CONVERT(char(2),
Day(time))) as Day,
   activeProjects, activeTasks
FROM periodicWorkStatus
  WHERE DATEDIFF(day, time, CURRENT_TIMESTAMP) <= 61) work
GROUP BY Day
ORDER BY Day desc

The archiveCustomProjectAttributes, archiveCustomTaskAttributes, and archiveCustomVendorAttributes tables can be used to generate reports that show values of custom attributes associated with projects, tasks, and vendors, respectively. These tables contain a row for each custom attribute, which means that the information about all the custom attributes for a particular project consists of several rows.

It is typical to want to display this information in columns, rather than rows. For instance, if you have custom project attributes called PO Status and Color, you may want a report that shows these attributes alongside other standard project fields (like due date):
ProjectDue_DatePO_StatusColor
Translate Brochures1/2/2006processedGreen
Update Web site2/3/2006pending approvalYellow
New User Guide3/4/2006receivedRed
To do this, you would need to construct a complex SQL query that gets the desired information from the archiveProjects table, then joins the archiveCustomProjectAttributes table once for each desired attribute. For instance, the following query could be used to generate the table above:
SELECT
	projects.name as Project,
	projects.dueDate as Due_Date,
	po.valuestring as PO_Status,
   color.valuestring as Color
FROM
	projectsArchive projects
	LEFT OUTER JOIN 
		(SELECT valueString, projectId 
		 FROM customProjectAttributesArchive 
		 WHERE name = 'PO Status') po
	  ON projects.projectId = po.projectId
	LEFT OUTER JOIN 
		(SELECT valueString, projectId 
		 FROM customProjectAttributesArchive 
		 WHERE name = 'Color') color
	  ON projects.projectId = color.projectId

If you need to make a large number of reports like this, you may find it simpler to create a view in your database that joins in all the attribute values of interest as columns; you can then use very simple queries based on this view in your reports.