I saved it to Big Query with Firebase Analytics.
I want to SELECT the events stored in the big query. But the tables are by date.
Is there anyway to SELECT events on these tables at once?
Check Wildcard Tables feature
Quick example:
#standardSQL
SELECT *
FROM `project.dataset.app_events_*`
Related
Im still new with DynamoDB , How do I query something based on the previous query result?
This is how my table look like :
I want to query for the list of project info for an user.
From my first query , the result of USER#001 have [PROJECT#001,PROJECT#002].
Then I want to get a list project detail based on the first query.
How do I make an "nested" query ?? or is there anyway there I can query more efficiently ?
*The table structure is fix, I cant change it.
You can't. That's not the way DDB works...
All you could do is a BatchGetItem() with the pk & sk for the two projects.
Or if you don't happen to know the SK, you'd need to make two individual Query() calls with the pk only.
I would like to cluster raw table with raw data of events from Firebase in BQ, but without reprocessing/creating another tables (keeping costs at minimum).
The main idea is to find a way to cluster tables when they create from intraday table.
I tried to create empty tables with pre-defined schema (same as previous events tables), but partitioned by _partition_time column (NULL partition) and clustered by event_name column.
After Firebase inserts all the data from intraday table, the column event_name stays in details tab of table as cluster field, but no reducing costs happens after querying.
What could be another solution or way how to make it working ?
Thanks in advance.
/edit:
Our table has detail tab as:
detail tab of table
After running this query:
SELECT * FROM 'ooooooo.ooooooo_ooooo.events_20181222'
WHERE event_name = 'screen_view'
the result is:
how query processed whole table
So no cost reducing.
But if I try to create the same table clustered by event_name manually with:
Create TABLE 'aaaa.aaaa.events_20181222'
partition by DATE(event_timestamp)
cluster by event_name
AS
Select * from ooooooo.ooooooo_ooooo.events_20181222
Then the same query from first IMG applied to created table processes only 5mb - so clustering really works.
I already link the firebase to bigquery, and everyday a new table gets created with the date stamp. The columns within the export can be found in the following link: https://support.google.com/firebase/answer/7029846?hl=en
BUT, there is not firebase analytics data(such as add_porduct_like, add_product_to_cart, and so on) being export. how can I export complete data into BigQuery.
Firebase Analytics data is already exported in those daily tables formed each day in Big Query.
What is required over here is to run queries in order to extract the relevant data.
Take a look at this doc for sample queries when Firebase Data is exported to Big Query.
In short, you need to make use of the schema and based on the Field Name, you can query the data obtained in Big Query by Firebase.
When you submit an event with parameters to Firebase Analytics, it is stored as an array in the column event_dim.params.
To get data from database, you will need to use this query (I'm using standard SQL):
SELECT
event_dim.name AS event_name,
event_dim.params AS event_params
FROM
`project.your_app.app_events_20171109`,
UNNEST(event_dim) as event_dim
If you want to get specific parameter, you'll also have to unnest another field:
SELECT
event_dim.name AS event_name,
event_dim.params AS event_params
FROM
`project.your_app.app_events_20171109`,
UNNEST(event_dim) as event_dim,
UNNEST(event_dim.params) as params
WHERE params.key LIKE "add_product_to_cart"
You can read more about how Firebase Analytics stores data and how to use UNNEST function here: https://firebase.googleblog.com/2017/03/bigquery-tip-unnest-function.html
I have a Customers table which contains the salesRepEmployeeNumber which is in the Employees table.
How do I do something like
SELECT *
FROM Customers
JOIN Employees
ON Customers.salesRepEmployeeNumber = Employees.employeeNumber
with icCube ETL ?
As pointed in another answer, you can add a table based in an SQL statement that would do the job. In case your original datasource is not able to do a join :
We've not yet an join transformation, added this in our todo list. On the meantime, what you can do is.
Create an Union Table with your two tables. This will create a new table with the columns of both tables. Put the small one, first as we're going to cache it later on.
Create a Javascript view, you might need to activate Javascript in your icCube.xml configuration. In this one you can cache the first table and use a bit of js to do the join. You can trigger the table change on a field being empty. Don't forget to put 'Table Row Ordering' to Keep Table Order.
hope it helps
No need to use the ETL.
With the designer, add a table with the + sign in the menu above DataSource. The next panel gives you the choice between reading data from an existing table or an sql query.
I have a task to retrieve data from two tables, from table one: name,firstname,lastname and also retrieve their cities from a second table. In the second table I have foreign key as table one's id as tbl_id in second table. please reply me and advice me is joinquery support or not in phonegap.
Just use websql join query
tx.executeSql( 'SELECT * FROM table1 JOIN table2 ON table1.primary = table2.foreign',
[],nullHandler,errorHandler);
},errorHandler,successCallBack);
In sucessCallback Function query results will be returned.
For more understanding of webSql database look into here
Its in the phongap documentation how to implement local database in mobile this