FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
08-31-2021 11:18 AM
Hello,
is there a way to install a lightweight database (eg. sqlite3) on ctrlX CORE to store configuration data of a snap.
I know that the ctrlX solutions snap is provided to save configurations to have backup data. But I want to access data in a more efficiently way and update snap data very often.
Thank you : )
Solved! Go to Solution.
08-31-2021 03:11 PM
The easiest way would be to use our data broker the ctrlX Data Layer for creating accessible data. See the SDK provider examples.
08-31-2021 04:13 PM - edited 08-31-2021 04:16 PM
DataLayer broker might be easy to access, but I want to store persistent data (configuration data).
What would you suggest? Do you have experience with lightweight databases on ctrlX CORE?
09-01-2021 01:32 PM
On the ctrlX Data Layer it is also possible to create persistent variables. The storage type would be sharedretain. You can simply adapt the realtime example of our SDK.
See also the documentation of the Data Layer:
09-10-2021 05:35 PM - edited 09-10-2021 05:58 PM
I have written something here based on the work here. I have introduced some bug in the latest version that I have not had time to fix. However, a version that works (at least for my testing) is available on snapcraft. You can download for the core using "UBUNTU_STORE_ARCH=arm64 snap download sqlite-ctrlx"
The read me should give you a good explanation.
09-14-2021 09:08 AM
Thanks for your help! I´ll try your app. : )
How did you install your sqlite db? I downloaded sqlite3 as a snap file, but couldn´t install it successfully.
09-14-2021 03:01 PM
On an Ubuntu machine you need to run "UBUNTU_STORE_ARCH=arm64 snap download sqlite-ctrlx" from the terminal. This will download the file for the hardware and "UBUNTU_STORE_ARCH=amd64 snap download sqlite-ctrlx" for the virutal core. Install them in the normal way after the download. You can ignore the assertion file that is downloaded. Make sure you have the option to run developer apps set on your core.
09-14-2021 05:06 PM - edited 09-15-2021 02:08 PM
Just a comment on the snap that aFouraker references here: In this use case it is not required to install SQLite separately. The associated snap runs as a standalone, referencing SQLite internally.
When creating an app like this the only requirement is to import the sqlite3 module in your Python code.