Materialized view on firebase events data in big query - google-cloud-platform

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

Related

Qt Sql Database which model need to use

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.

Powerbi ability to create snapshot data from a historical table of data

I have a sql database linked where I have the complete history of products and users. I want to the user to be able to select on the slicer a year and the data automatically shows active prodcuts, expired products and new products added in that year (or snapshot).
Is there a way this can be done? I am not able to find a measure to best do this for me.
I recommend creating a date dimension table first - I usually call mine Calendar. Please read this useful post by Radacad which will show you how to create one > https://radacad.com/power-bi-date-or-calendar-table-best-method-dax-or-power-query
Once it's done create relationships between your fact tables and calendar table on key dates of when your products are active or expired - I'm making a huge assumption that's what your tables store.
Your calendar table will then act as a single time/date point of truth and should be used to slice and dice your fact table.
Hope this helps!

How to create a filter in powerbi that will dynamically query the db using a SP with a parameter

I am trying to run a direct query on my DB and apply a filter input by the user. The user input would be used as a parameter for my Stored Procedure that retrieves the data I want to display to the user. The reason for running a direct query and not just refreshing the data and then the user filtering from all of that data, is that the database is really large and it would make the report file approx. 650mb in size. My idea is that with a direct query, I can pull only the data required through an indexed column that the Stored Procedure uses to filter.
Currently I was able to create a parameter in the Query editor and use it in a query function but this creates an "Invoked Function" table. If I use these results in my report essentially the user can only filter through the result I filtered in my query editor. I want the user to be the one to input that value and the report to dynamically load it.
As far as the filter field, I am using a slicer and added the search capability to it so they can type out the search value and select the result in the list. Ideally I would like a textbox that they can type the value they want and search for it.
Is this possible in PowerBI? and if so how could I accomplish this?
You have to download a separate application called Power BI Report Builder to accomplish this and create a paginated report. See Url below:
Paginated Reports

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.

How to query a Dynamo DB table without knowing the table name before runtime?

I want to query a Dynamo DB table based on an attribute UpdateTime such that I get the records which are updated in the last 24 hours. But this attribute is not an index in the table. I understand that I need to make this column as an index. But I do not know how do I write a query expression for this.
I saw this question but the problem is I do not know the table name on which I want to query before runtime.
To find out the table names in your DynamoDB instance, you can use the "ListTables" API: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ListTables.html.
Another way to view tables and their data is via the DynamoDB Console: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ConsoleDynamoDB.html.
Once you know the table name, you can either create an index with the UpdateTime attribute as a key or scan the whole table to get the results you want. Keep in mind that scanning a table is a costly operation.
Alternatively you can create a DynamoDB Stream that captures all of the changes to your tables: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html.