get all data from store like raw in redux - redux

I want to get all the data from the store in order to replace some variables there, is it possible to do this?

Related

Lost on .rds files/pulling data from tables

Very new using R for anything database related, much less with AWS.
I'm currently trying to work with this set of code here. Specifically the '### TEST SPECIFIC TABLES' section.
I'm able to get the code to run, but now I'm actually not sure how to pull data from the tables. I assume that I have to do something with 'groups' but not sure what I need to be doing next to pull the data out of it.
So even more specifically, how would I pull out specific data like revenue for all organizations within the year 2018 for example. I've tried readRDS to pull a table as a dataframe but I get no observations or variables for any table. So I'm sort of lost of what I need to do here to pull the data our of the tables.
Thanks in advance!

Using R with IOT data logged using "Hysteresis Logging" (only log differences)

We want to perform data analysis on IOT data which is stored into our SQL Server database. The data itself is generated by IOT devices and some are using hysteresis based logging for data compression. Which means that it only logs a value when the data for that particular property has changed.
As an example, here's how it looks inside the database:
The Float and Timestamp are actually the interesting values we're looking for. The rest is meta data. AssetTypePropertyId is linked to the name of a certain property. Which describes what the value is actually about.
We can reshape this data into a 2d matrix, making it already more useable. However, since the data is compressed with hysteresis logging we need to 'recreate' the missing values.
To give an example we want to go from this 2d dataset:
To a set which has all the gaps filled in:
This is generated under the assumption that the previous value is valid as long as no new value has been logged for it.
My question: How can this transformation be done in R?

Ionic storage - tables with key-value pairs?

Is there a way to use something like tables combined with key value pairs in ionic 2+?
Explanation: I know ionic supports sqlite, but I don't need actual sql queries nor table structures. However the key-value pairs quickly hit a dead end.
For example if I have records of posts, all with unique ids (e.g. uuid), I could save every post as key-value like
let posts = [post1,post2,post3]
posts.foreEach(post=>{
this.storage.set(post.id,post)
})
However then I cannot retrieve the posts, because I don't know their ids.
Alternatively I could store the whole array like
let posts = [post1,post2,post3]
this.storage.set("posts",posts)
However then I cannot add, remove or edit a single post without first loading and then saving the whole array again. Especially with a lot of entries the rewriting becomes quite slow as I noticed.
It would be nice to have the option to group the key-value pairs into something like a table. Any chance to do so without using actual sql commands a la CREATE TABLE...?
I've seen the storage offers the option to create different instances, but unsure whether this fits the purpouse.

How to determine position of specific character/string in SQLite string column value?

I have values in a SQLite table* that contain a number of strings, of different lengths, joined by periods, something like this:
SomeApp.SomeNameSpace.InterestingString.NotInteresting
SomeApp.OtherNameSpace.WantThisOne.ReallyQuiteDull
SomeApp.OtherNameSpace.WantThisOne.AlsoDull
SomeApp.DifferentNameSpace.AlwaysWorthALook.LittleValue
I'd like to extract (in this case) the third period-delimited substring so I could write something like
SELECT interesting_string, COUNT(*)
FROM ( SELECT third_part_of_period_delimited_string(name) interesting_string )
GROUP BY interesting_string;
Obviously I can do this any number of ways programmatically; I'm wondering if there's any way to achieve this in a SQLite SELECT query?
* It's a SharpDevelop Profiler database, if anyone's curious
No.
You can, as you mention, work with the strings after you have selected them from the database. Or you can split them up into separate columns when they are stored.
If you do not have access to the code that is storing the data, you might want to consider reading the data in its entirety, splitting the strings and storing the split out tokens in separate columns in a new table. If the data is not too large, you might look at storing this table in a new memory database to give excellent performance.
Whether this is worthwhile depends on whether one pass to split the data strings can be made use of many times. If the data is constantly changing, then this scheme would probably not work well.

Data Structure for storing dynamic data

I want to store data which is dynamic in nature. The user can create forms for capturing data. The data can be stored in various formats as per the configuration. The major ones are a RDBMS and a XML file. XML file format is pretty easy to store dynamic data and load it back.
I am not able to devise a data structure for a RDBMS. I currently store data in a key-value format and do a PIVOT for fetching it. For fields which have multiple values I store them as CSV in the value column.
Is there a better way for storing such dynamic data which helps in performance and extensibility?
Without knowing more about your application it is hard to say.
You could save the data as XML in a BLOB in the database. That would mean all your data was (sorta) handled the same way (as XML).
The other approach would be to change your database structure to hold nested data (which appears to be your problem). So instead of a straight key-value table you might hace a table structure that could reference itself (e.g. parent - key - value) and have a header table to hold the top level keys.
The real question though is why you want to use a database to hold the data. It seems the real problem is trying to fit a round peg into a square hole (or vice versa).

Resources