Page tree
Skip to end of metadata
Go to start of metadata

Import Summaries Table

This table holds one template record that can be used to generate new records on a scheduled basis. Each record holds all of the import logs for one import event, which might include records being imported into multiple tables.

Within each Import Summary record, a user can view the imports that were run and their status, the number of records imported, and so on. Here is the result of a single import run:

image2018-9-28_15-39-17.png

The first import summary record is a template that is used to create all of the other import summary records. This template record should be linked to the import template record that represents the first table to be imported.

Automation

This table holds the following rules:


Create: Import Summary creation actions - launch template and update title

This rule runs when an import summary record is created by web or API. It sets the title to "Weekly Import Summary on [date]" with an update action:

"Weekly Import Summary on "+dateformat("MMM dd yyyy",NOW())

and also runs a linked record action called "Trigger import in first import template," which goes down to the linked first import template record and updates a flag field in that record to cause it to be converted into a new Import Log record linked back to the Import Summary.

U: Set Latest Import Summary ID and flag to convert:

The import log records are the records that actually run the import action and report back the results.

When one record is finished, it launches the subsequent one, and so on, until all are finished.

When all the imports are finished, a rule on the Import Log table updates the Import Summary record to set a field called Completed to Yes, and causes a recalculation of the number of imports fields in the Import Summary, and this update triggers another rule on the Import Summary table called "Edit: Import summary update when completed" which checks to see if there were any failed import logs. It runs the following action:

If there were failures, it sends an email to the Admin Team notifying them of the failure.

If not, it sets the status to Completed Successfully.

Edit:  Import summary update when completed

This rule runs when an import summary record is edited by web or API. It runs an if-then action to update the Status of the import summary record and send an email based on the status of the import logs.

(Disabled) TB weekly:  Convert template to start process

The time based rule starts the import process. By default, it runs weekly on Saturday at 3am. It runs a conversion action that creates a new Import Summary record by converting the record with the word "template" in its title to a new record. The conversion maps only one field: the default starting import template:


CONTENTS
  • No labels