Deploying a script to all assets in one click with Factry Historian

Your factory has thousands of assets, pumps, valves, ... running calculations on them and deploying scripts shouldn't be done one by one. Here's how to use a single dynamic script across many assets.
No items found.
Factry Historian
Technical Deep Dives
Jente De Meyer
3
 min read
Published on
Jul 10, 2025

Why write dozens of nearly-identical scripts when you can write one?

In this post, we’ll show how to use metadata inside Factry Historian calculation scripts to make them flexible, reusable, and scalable. Instead of hardcoding logic per asset or prototype, data engineers can dynamically reference metadata like flow machine type, zone, or product line to apply the same script across hundreds or thousands of assets.

First off why bother?

Because your factory doesn’t just have “some” assets. It has thousands. Pumps, silos, mixers, conveyors, … every machine, sensor, or production line you track is an asset. Copy-pasting calculation scripts for each of them is a waste of time, and worse, a recipe for errors.

If you’re a data engineer, automation engineer, or process analyst working with a legacy historian, you’ve probably had to:

  • Duplicate scripts for every asset
  • Manually update each one
  • Debug inconsistencies line by line

That approach is tedious, error-prone, and worst of all: it doesn’t scale.

With Factry Historian, there’s a smarter way: use metadata as parameters in your scripts. Write once, reuse everywhere.

Instead of flowrate_pump_12, flowrate_pump_13, flowrate_pump_14… You write your logic once and reuse it across your entire model.

Below is a video on how it works. In this example we’re adding a prototype, adding a calculation and then pushing it for all assets. Imagine having to do all this what you see in the video but times 20, times 200, times 2000 …

It lets you use a single dynamic script across many assets by referencing metadata. So you’re not “deploying a script to 1000 assets” you’re deploying one reusable script that adapts to each asset.

Want to dive deeper?  Check out our docs on accessing metadata in scripts.

Subscribe to our newsletter

Stay updated on the latest Factry news and gain insights to improve the way your factory works.

Still hungry? There's more to read

Discover some of our most popular stories.
View all