Qt Sql Database which model need to use - c++

I have to fetch some data from different database table and show in table view, the table view not contain all column from database but mixed from different data base table. I need to do the following.
Fetch few column from table1.
Fetch one cell from table2 and edit the data from table1(1 or 2 column).
Display the edited data on table view.
Update table1 on DB while user edit on table view.
Update table view in particular time interval.
So should I use QAbstractItemModel or SQL Model Classes like QSqlQueryModel, QSqlTableModel,QSqlRelationalTableModel .Whcih one is more suited in my scenario.
I looked in documentation but seems minimal example.

Related

PowerBI Data Model Not Recognized

I have a data model set up in PowerBI. I have a date table that's the fact table, and numerous data tables that are dimension tables.
Here is a picture of the data model. They are all connected Date[Date] <--> Table[Timestamp].
The table in question is the bottom table, RDS-WST00X-BZF-Insolation.POA.AM
Here is the table where the issue can be seen. It's like Measured Insolation doesn't see the Date Table, even though there is a connection set up in the Data Model
Here is the measure in which Measured Insolation is calculated from the RDS-WST00X-BZF-Insolation.POA.AM table
Finally, here are screenshots of both the Date Table and the RDS-WST00X-BZF-Insolation.POA.AM table

Materialized view on firebase events data in big query

I have a table in bigquery which fetches data from my firebase events analytics. The table is made in such a way that it appears to create a new table based on the date. But inside the databaseUI it appears as a single table. It changes when I click on it.
For example: Today's table name would be ‘tablename’_<today’s date> and when I use the filter option available in the big query UI for this particular table type. The name changes to ‘tablename'_'selecteddate'.
I want to create a materialized view on the complete/ combine table of all dates. Not just on a table with a particular date.
How can I do it? Can someone please guide me?
The columns I want in Materialized View is even_date, event_name, event_params( key and value) , count of event_params (of key and value both).
I am unable to find a way. So is it possible?
Thank you

How to use a single slicer to manipulate multiple plots in PowerBI

I have multiple tables, all having one common column like:
Table1 => datetime, val1; Table2 => datetime, val2...
I have multiple plots on my page using these tables, and dont want to make changes to my tables
I want to create a single slicer to manipulate all these plots on the page. How do I do this in PowerBI
And also, how to do the same using a common filter.
When you add the slicer to the page, it will automatically apply to all visuals on that page, IF the slicer has a logical connection to the data.
If you have different fact tables that all have a datetime column with the same name, then you may need to build a calendar table that has all the dates and create relationships between the different fact tables and the calendar table.
You can then use a slicer with the calendar table date field. Since there is a relationship between your fact tables and the calendar table, the slicer on the calendar date will then also filter the visuals that pull data from the fact tables.
If with "common filter" you are referring to a page filter, again, you can use the calendar table date to filter the related data from the fact tables.

Can an Azure table be split on partition keys in PowerBI?

I am aware that an Azure Table has a composite key that is made up of a RowKey and PartitionKey. I am also aware that you can pull and Azure Table into PowerBI. I am new to PowerBI, so I am not sure if I am using the right term, but what I would like to be able to do is break my Azure Table into multiple tables in PowerBI based on the PartitionKey. Is this something that is possible? If so, can someone point me in the right direction?
Thanks
Import all your Azure Table data as one PowerQuery table. Then right click on the table in the PowerQuery editor and select Reference. This will give you a new table that points to the Azure Table data, call it "Partition Key Link" or "Partition Key Bridge". Remove all the row data columns. Right click on the partition key column header and select "Remove Duplicates". You now have a table of distinct Partition Keys. The go to your PowerBI model view. Create a relationship between the link table and the data from your Azure Table. You can then link your other data to the link table in order to get to a model that will work well in PowerBI.

Filter two tables using the same filter in powerbi

I have two tables showing country data in PowerBI, one table contains sales data in different countries and another shows stats about each country. I then have a dashboard that has a chart from each table. I want a single filter that filters on the country column in both tables.
i.e. If I filter on the US, I will get a chart showing sales data in the US and a chart showing other stats about the US.
The country columns have duplicate values in both tables so doing a relationship between them is difficult. Moreover the tables are not really related to each other as such, I just to filter the data in both so my dashboard updates both charts. Any help?
Create a table that just has the list of unique countries and make a relationship from that table to both other tables. Then use that table for your filter, rather than the country column of either of the two original tables.