← 7 Add automation / ↑ 3.3 Foundry QS1 / → 8a Add processing of updated objects

26.1112 17:32 (converted from docx source file to markdown+PNGs by ChatGPT)


TOC


8.0 What we will build

Summary. Schedule the Python import to fetch MockAPI records into 693_MockAPI_Items (dataset) every two minutes. NOTE: Limitation: the import fetches new and updated records, but the Chapter 7 automation processes only newly added objects. Updating an existing object does not trigger another AI operation.

Chapter 8 screenshot 8_01.png

Configuration

1. Delete the old build schedule, if one exists.

2. Create a new build schedule.

Workflow

1. In MockAPI, add an item with a new, unused Id, preserving the existing items.

2. Wait for the scheduled import. Do not manually click Build or run an Action.

3. Trace the result:

3.1 Dataset viewer → 693_MockAPI_Items (dataset): verify the new row.

3.2 Data Lineage → build schedule → Metrics & History: verify a successful scheduled build.

3.3 Insight → Capstone2Record objects: verify the new object and its saved CheckResult.

3.4 Automate → 693_AIPL_CR_Automation (automation) → history: verify successful execution for the 3.5 new object.

3.5 Workshop → 693_RecordViewer (your UI): verify the new object appears in the table.

4 In Data Lineage, pause the build schedule after testing.


8.0b Accessing applications


Build schedules / data lineage

Chapter 8 screenshot 8_02.png

Chapter 8 screenshot 8_03.png

Chapter 8 screenshot 8_04.png


Dataset (not shown in list of applications)

This section addresses an important gap.

Chapter 8 screenshot 8_05.png

For the dataset entry, use: Open the existing dataset: In the OntologyDemo001 project, find and open 693_MockAPI_Items. Then select Preview → Schedules.

Chapter 8 screenshot 8_06.png

Do not use New → Dataset—that creates another dataset.

Chapter 8 screenshot 8_07.png


8.1 Pause / Delete any existing old schedule


8.1.1 Pause schedule (pause any schedule you are not using)

1. In Data Lineage → Schedules, open Schedule d077a76b98.

2. Click Pause.

3. Verify the schedule shows Paused.

Leave 693_AIPL_CR_Automation active.

Chapter 8 screenshot 8_08.png

Chapter 8 screenshot 8_09.png

Chapter 8 screenshot 8_10.png


8.1.2 Delete schedule

In Data Lineage, click Back to schedules list at the top of the right-hand panel.

Show that list so we can locate the delete control for Schedule afe13ab56b. Leave it paused.

Chapter 8 screenshot 8_11.png

Click Edit.

Chapter 8 screenshot 8_12.png

Chapter 8 screenshot 8_13.png

Chapter 8 screenshot 8_14.png

The delete control appearing only after Edit certainly made that harder to find. The old schedule is deleted: the panel shows 0 schedules for 693_MockAPI_Items.


8.2 Create new schedule

1. The schedule builds 693_MockAPI_Items (dataset) every two minutes.

2. Each build runs capstone2_items.py (Python script) from 015_MockAPI_Import (repository).

3. The script fetches records from MockAPI and writes them into the dataset.

015_MockAPI_Import (repository), showing capstone2_items.py (Python script).

Chapter 8 screenshot 8_15.png

Chapter 8 screenshot 8_16.png

4. For this new schedule:

- Schedule description: Build 693_MockAPI_Items (dataset) every two minutes

  • Keep Targets-only selected.
  • Keep 693_MockAPI_Items (dataset) as the target resource.
  • Under When to build, select At a specific time.
  • Set Run every → 2 Minutes and Starting at → 1 minute past the hour.

The screenshot uses the older description “Fetch MockAPI every 2 minutes”; the description is only a label.

Chapter 8 screenshot 8_17.png

2 Expand Advanced options → enable Force build and acknowledge its warning.

Chapter 8 screenshot 8_18.png

Chapter 8 screenshot 8_19.png

3 Click Save at the top of the above panel. This returns to Data Lineage dialog.

Chapter 8 screenshot 8_20.png

The new schedule is saved and enabled.

- Schedule d077a76b98

  • Force builds 693_MockAPI_Items
  • Every 2 minutes, at minutes 01, 03, 05, …
  • Timezone: America/Indianapolis

8.3 Add a MockAPI item with a new (unused) ID

To test:

1. Add a MockAPI item with a new, unused Id, preserving existing items.

Chapter 8 screenshot 8_21.png

Chapter 8 screenshot 8_22.png

Id 7 is new, and the existing six items are preserved.

2. Save the MockAPI update, then wait for the scheduled import and automation.

3. In Ontology Manager → Capstone2Record, look for Id 7. We expect Integer = 777 and CheckResult = FOUND, using the automation’s criterion “integer is greater than 100.”

Chapter 8 screenshot 8_23.png


8.4 Trace the result (then pause the schedule)


8.4.1a Dataset

Dataset viewer, opened by opening 693_MockAPI_Items from its project or folder. Open 693_MockAPI_Items → Preview → Schedules.

Chapter 8 screenshot 8_24.png

Chapter 8 screenshot 8_25.png


8.4.1b Dataset Metrics / Schedule

Chapter 8 screenshot 8_26.png

Chapter 8 screenshot 8_27.png

Chapter 8 screenshot 8_28.png


8.4.2 Insight

Chapter 8 screenshot 8_29.png


8.4.3 Automation

Chapter 8 screenshot 8_30.png


8.4.4 UI

Chapter 8 screenshot 8_31.png


8.5 Test CheckRecord in UI (this is not automation)

Chapter 8 screenshot 8_32.png

Chapter 8 screenshot 8_33.png

Chapter 8 screenshot 8_34.png

Chapter 8 screenshot 8_35.png