Tools
SQL table designer
Generate a PostgreSQL, SQL Server or MySQL schema for PLC and sensor data, with a duplicate-safe INSERT.
Generated schema
Design notes
The generated script is a starting point; adapt it to your naming, security and retention standards.
Why this design?
The source timestamp (source_ts) is kept apart from the ingest time (ingest_ts), so the event’s real time survives reconnects and buffer replays. The unique key rejects a sample that arrives twice (a retry). Timestamps are stored in UTC.
PLC to SQL data model guideFrequently asked questions
Should I choose a long or wide table layout?
The long layout lets you add tags without a schema change and suits time-series queries. The wide layout simplifies reporting with a fixed set of tags. Prefer long if your tags change often.
Can a retry create duplicate rows?
With the unique key and the INSERT pattern the same equipment, tag and source time is not written twice. Still verify this in an outage test. See the glossary for the concept.
Your inputs and calculations stay in your browser. No account is needed.
Your next step
Let’s talk about the systems you need to connect.
Share your source, destination and intended outcome. We’ll help define the project scope.