IMD SolutionComputing LibraryShop main store

Selection guide

Selecting a route from PI data to Azure Machine Learning Studio

Edge computing and IIoT Published 6 min read

Short answer

Export a text file from the PI Integrator for Business Analytics Text File target and import that file into Studio: it is the only pairing of the two products' published connectors that moves PI data without an intermediate database. Host the same file over HTTP when Studio must pull on a schedule, and reject Cosmos DB and every database target because each one stores PI data in a database.

On this page
  1. Route decisions at a glance
  2. Why the near-matches fail
  3. The file handoff, step by step
  4. Sizing the export: a worked example
  5. Late data, regeneration, and the limit of the rule
  6. Questions asked

Select the PI Integrator for Business Analytics Text File target on the PI side and Studio's Import data from file module on the Azure side: export a delimited file, then import it. That pairing is the only combination of the two products' published connectors that satisfies a project rule of no intermediate database in any form, and it moves real volumes easily — the 24-signal, 90-day worked example below is a 5.5 MB file. The frequently suggested alternative, PI Web API JSON written into Azure Cosmos DB, fails the rule on its first hop, because Cosmos DB is a database service holding a copy of your process data. Everything else on the Integrator's target list either lands in a database or has no matching Studio input. The sections below rank each route, explain why the near-matches fail, and walk the file handoff end to end with that sized example.

Route decisions at a glance #

Apply the constraint first and convenience second: the rule eliminates more routes than the connector mismatch does. The Integrator publishes view data to its documented target list, Studio's import modules read from their documented source list, and exactly one pairing survives both.

Route PI-side connector Studio-side connector Decision under the no-database rule
File export, manual import Text File Import data from file Use this as the default route
File export, hosted for retrieval Text File plus a web endpoint you control Web URL via HTTP Get, which accepts CSV, TSV, ARFF, or SvmLight Use when Studio must pull the dataset on a schedule
JSON into Cosmos DB PI Web API response, copied across Azure Cosmos DB Reject: the copy in Cosmos DB is an intermediate database
Relational targets Microsoft SQL Server, Oracle Database, Azure SQL Server, Azure SQL Data Warehouse Azure SQL Database, Import from On-Premises SQL Server Database Reject: each one stores PI data in the forbidden intermediate database
Big-data targets Apache Hive, Hadoop HDFS, Azure Data Lake Store Hive Query Reject: distributed storage holding the copy is a database in the sense the rule was written against
Streaming targets Apache Kafka, Azure Event Hubs, Azure IoT Hub none on the import list Reject: no Studio-side match exists at all

The two usable rows are one file delivered two ways. Start with a manual import, because it proves the dataset contract with the fewest moving parts. Add HTTP hosting only after the import works and unattended retrieval becomes a requirement, since hosting adds an endpoint to secure and a publication schedule to keep.

The rejected database targets are sound engineering when a relational warehouse is the real destination — the decision path in choosing a PI System to Oracle integration route with validation covers exactly that case — but here the warehouse would exist only to violate the rule. If the rule is ever relaxed, the Azure SQL route still needs encrypted transport before process data leaves the plant; configuring PI Integrator TLS for Azure SQL Database documents that setup.

Why the near-matches fail #

Studio's Import from Azure Blob Storage reads the Azure blob service, while the Integrator's list offers Azure Data Lake Store. Those are separate services with separate interfaces, so a Data Lake Store publication does not become blob input by naming similarity. Bridging them means another managed store and a copy step between products. That bridge is no more compliant than the file route and carries more machinery, so skip it.

Apache Hive is the one name-level match on the two lists: the Integrator writes Hive, and Studio's Hive Query module reads it. Reject it anyway. HiveQL queries distributed storage that holds a copy of your process data, which is a database in every sense the constraint was written against, whatever the engine is called.

Azure Cosmos DB is the path people reach for, because PI Web API serves JSON and Studio has an Azure Cosmos DB input. Two problems: nothing on the Integrator side writes Cosmos DB, so the bridge is custom code plus a provisioned database service, and that service is precisely what the project forbids. Note also that the HTTP module accepts CSV, TSV, ARFF, or SvmLight — a JSON response from PI Web API satisfies none of them without conversion.

The streaming targets, Apache Kafka, Azure Event Hubs and Azure IoT Hub, have no counterpart anywhere on Studio's import list, so they fail before the constraint is even applied. An Azure IoT Hub target earns its keep feeding stream consumers, the class of project described in selecting a gateway to publish Modbus data to Azure IoT Hub, not a batch import into a training tool. The remaining Integrator target, PI View, stays inside the PI System rather than crossing to any consumer.

The file handoff, step by step #

  1. Fix the dataset contract first: signals, column names, units, time window, timestamp convention, and how missing or bad-quality values are represented. Decide whether the model needs recorded events or values aligned to common timestamps, because that choice drives the view type and extraction method.
  2. Confirm the edition. The Integrator documentation maps publish targets to editions and view types, so verify Text File appears for the edition you license before the design freezes.
  3. Build the asset or event view. The export carries PI asset context with the values, so name columns for the model rather than for the archive.
  4. Publish the Text File target into a controlled directory. Give the export process write access, give the import step read access, and give nothing else either.
  5. Inspect one bounded export, a single day, before scheduling anything. Check delimiters, the header row, quoting and decimal representation against the format you will import, and convert once, with the conversion documented, if the layout is not directly usable.
  6. Import into Studio and verify column types, missing-value counts and timestamps before wiring any model module to the dataset.
  7. Publish completed files only. Write to a temporary name and rename when the export closes, so the consumer never parses a half-written file.

Sizing the export: a worked example #

Illustrative sizing with round project numbers; substitute your own tag count and window.

A 24-signal dataset, sampled every 5 minutes, one row per timestamp, over a 90-day window:

  • Rows: 90 days × 24 h/day × 12 samples/h = 25,920 rows.
  • Row width: a 20-character timestamp plus 24 values at about 8 characters each with delimiters is roughly 212 bytes.
  • File size: 25,920 rows × 212 B = 5,495,040 B, about 5.5 MB.
  • At 1-minute sampling the same window is 129,600 rows × 212 B, about 27.5 MB.

Both sizes move by ordinary file transfer, so bandwidth is not the constraint. The real cost of a wrong window is regeneration time, which is why the next section treats re-export, not row-level repair, as the fix.

Late data, regeneration, and the limit of the rule #

PI archives accept late writes, and the Integrator's documented late-data guidance is written around exports to a SQL table, where past rows must be reconciled. A text file has no rows to reconcile: when late data lands, re-export the affected window as a new version and let the next model run use the corrected file.

Read the wording of the constraint exactly once and design to it. A file is permitted, and it is still a persisted copy of process data; if the project also bans staged files, no pairing of these two connector lists complies, and the compliant route becomes custom code that queries PI directly from inside the analysis environment.

Questions asked

Does this connector list still apply to the current Azure Machine Learning designer?

The import modules quoted here belong to the classic Studio web service, which Microsoft has retired. The current designer reaches data through registered datastores and local uploads instead of module-by-module connectors, so the decision does not change: export the text file, land it where the designer can read it, and consume it from there. Verify the accepted formats in your workspace before freezing the file layout.

What if the project also forbids staged files, not just databases?

Then no pairing of these two connector lists complies, because the file handoff is itself a persisted copy of process data. The only compliant route is code that runs inside the analysis environment and calls PI Web API directly, holding the JSON response in memory for parsing without writing it anywhere. That path carries development and test effort the file route avoids, so challenge the stricter wording before committing to it.

How do you keep model runs reproducible when data moves as files?

Version every export: write to a temporary name, rename atomically when complete, and stamp the file with the view configuration and time window it was built from. Record which file version fed each trained model so a questionable prediction traces back to the exact dataset. Treat regeneration after late data as a new version rather than an edit.

Which Integrator edition do you need for the Text File target?

The Integrator documentation publishes an editions table that maps each view type to its supported publish targets. Check that Text File appears against the edition you are licensing before the design freezes, because the target list is an edition property, not a universal one. The asset or event view type you plan to export must be supported in the same row.

Keep reading

  • Explainer

    AVEVA Historian to PI replication version requirements

    Replication from AVEVA Historian to AVEVA PI needs the 2023 release of Historian or later and PI Web API v1.16.0 or later on the destination. The two version numbers never need to match, and there is no direct requirement on the PI Archive version. Historian-to-Historian replication instead requires the destination to be the same version or newer than the source.

    Edge computing and IIoT

  • Explainer

    Connect on-premise OPC UA and SQL servers to a cloud PI System

    Yes. Install the AVEVA adapters on-premise, on a small host next to the OPC UA and SQL servers, and point egress at PI Web API in the cloud; the PI Data Archive port is not a supported egress destination. Only the adapter-to-Web API direction needs an outbound route.

    Edge computing and IIoT

  • How-to

    Send PI historian CSV exports to an S3 bucket hourly

    Keep the two jobs separate: the existing export produces the hourly CSV, and a scheduled uploader on a host that can read the export folder and reach the bucket delivers it to S3. Verify the completed CSV before any transfer, and scope the upload credentials to that one bucket prefix. The historian does not write to S3 by itself, and an SFTP endpoint is not a bucket.

    Edge computing and IIoT