SQlite and inductive studies

I’m new to ignition and following the inductive university.Created the database with SQlite and followed the course “Building in perspective”I am at the part where i have to create a power chart but upon trying to connect the the database there is nothing showing up under the tag panel.

I spent the better part of 5 hours trying to Google the issue with no resolve

This doc states:

2.2. Date and Time Datatype

SQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values:

  • TEXT as ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS").
  • REAL as Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. according to the proleptic Gregorian calendar.
  • INTEGER as Unix Time, the number of seconds since 1970-01-01 00:00:00 UTC.

The historian tables require a DATETIME datatype column. You haven't got one.

I think you'll need a grown-up's database!

The good news is: with docker, it’s super easy to spin up a database.
If you’re not already using docker, I suggest you do that. Make a simple docker compose that will start an ignition container, and a db container (if you don’t have a requirement on the DB, pick Postgres), a volume for each of these containers, and a network so they can communicate.
If you’re not familiar with docker this might sound complicated, but it’s really not. You can find docker compose examples easily, probably even on this forum, and any LLM can help you write one.

2 Likes

Sqlite can be used as a history provider in ignition, it's just not recommended for anything other than testing. Although I was using it originally on my rpi at home storing flow meter readings. I've since replaced it with mariadb.

That date time field in the history tables likely just use integers.

To reply to the OP though, have you configured any tags to have history enabled?

The t_stamp column is integer, but storing datevalue seems to require a DATETIME. I have no idea if it will work if not storing datevalues.

It's kind of strange storing datetimes as the values anyway though :person_shrugging: