Using Logflare with Google Data Studio
Make dashboards and get insights out of your event data.
When you log into Logflare with your Google account we automatically give you access to the underlying Big Query tables associated with all your sources.
Even if you've never used Data Studio before it's fairly painless to get up and going quickly.
Open Data Studio and Add a Data Source
Select the BigQuery Connector
Find Your Logflare Source
Select Partitioned Table Time Dimension
Keeping this selected will make your reports faster and let you effectively use the date range picker in a report.
If you just started sending data to your Logflare source, you may not see anything in Data Studio with this selected. In this case it's best to wait 15 minutes so you have some data to play with in Data Studio.
Keeping this selected will also help with ongoing BigQuery costs associated with queries.
What are Partitioned Tables Exactly?
Partitioned tables are very cool and provide a lot of benefits when you're using the BigQuery platform and Data Studio.
- Data storage is half price when data in a partitioned table is older than 90 days. When a table hasn't been modified in 90 days you only get charged half the normal rate. Because when you partition a table, it separates that table into many different underlying tables, you automatically benefit from this discount.
- Potentially large savings on query costs. When you partition a table you can limit your queries by the partition and BigQuery will only scan the data in the selected column / parition combination. This prevents BigQuery from scanning everything for the entire column, which saves money and makes your queries more responsive.
- Data Studio's cache is highly optimized for time based paritioned tables so you automatically get these query optimizations when you use Data Studio and BigQuery.
The only caveat is data in the streaming buffer isn't returned with paritioned queries by default and Data Studio doesn't include streaming buffered data at all when you opt for using partitioned table optimized queries. If you're building your own system on top of BigQuery you can query the streaming buffer direclty with a query like this as data in the streaming buffer has a NULL value for the _PARTITIONTIME column (source):
Learn more about BigQuery and partitioned tables
SELECT fields FROM `dataset.partitioned_table_name` WHERE _PARTITIONTIME IS NULL
Set Timestamp Type to Date Hour
This is optional, but lets you see more fine grained fluctuations in your data.
If you'd like to mix hourly and daily data in your reports you can
duplicate that field and set one to
Date Hour and keep one as
Create Report & Configure Settings
Select Report Data Source
Set Default Report Date Range
Create Your First Chart
Google Data Studio has extensive documenation and lots of tutorials where you can learn more.Data Studio docs