Working out which BigQuery query I am paying for? - google-bigquery

I am new to BigQuery and I have a question regarding billing - I have a recurring (almost daily) charge on my account and I think it is related to a query I have embedded into a published Tableau report - people are viewing the report and I am being charged - however the charge is more that I am expecting. How can I track the charge back to the specific query to confirm which one is raising the charge?
Thank you for your help,
Ben

I would start by enabling audit logs and inspecting the logs.
Audit logs are available via Google Cloud Logging, where they can be immediately filtered to provide insights on specific jobs or queries, or exported to Google Cloud Pub/Sub, Google Cloud Storage, or BigQuery.
To analyze your aggregated BigQuery usage using SQL, set up export of audit logs back to BigQuery. For more information about setting up exports from Cloud Logging, see Overview of Logs Export in the Cloud Logging documentation.
Analyzing Audit Logs Using BigQuery: https://cloud.google.com/bigquery/audit-logs

Related

Usage Tracking in Azure synapse analytics

Can anyone share a Kusto query (KQL) that I can use in log analytics that would return some usage tracking stats?
I am trying to identify which "Views" and "Tables" are used the most. Also trying to find out who the power users are and commands/query that is run against the "Tables".
Any insights would be appreciated.
You can use below functions to gather the useage statics
DiagnosticMetricsExpand()
DiagnosticLogsExpand()
ActivityLogRecordsExpand()
And create target tables to store the function data to analyse the useage information.
Refer the Azure documentation for complete details https://learn.microsoft.com/en-us/azure/data-explorer/ingest-data-no-code?tabs=activity-logs
Tutorial: Ingest monitoring data in Azure Data Explorer without code
In this tutorial, you learn how to ingest monitoring data to Azure Data Explorer without one line of code and query that data.

Adding source control to Azure Log Analytics Workspace Functions

Has anyone found a solution to adding source control to Azure Log Analytics Workspace Functions? (KQL queries saved on the Azure GUI)
I have a number complex queries and I would like to track changes over time. So far my searches have not come up with anything.
Azure has a vast support in REST API
Docs / Log Analytics / Saved Searches / Saved Searches - Create Or Update

Getting a user's marketing source from Google Analytics

I'm a backend developer who has no experience with Google Analytics, but I've a requirement to find a way to collect the Marketing Medium/Source for each user from Google Analytics and save it in my database, I've been searching and looking how to get it from an API request but I didn't find a way yet, could you guys help?
You can use the Google Python API to fetch the Google Analytics data. You can read more here.
Medium and Source information can be found out by using the dimension ga:sourceMedium
You can find more info about dimensions and metrics here
Following which you can setup a daily script and fetches the data from your Google Analytics account and dumps data into csv which you can successively load into your database using libraries such as psycopg2.

Changing Billing Tier for BigQuery in Datalab

How do I set the billing tier for queries executed through the BigQuery APIs in Google Cloud Datalab?
It is currently not possible to change the billing tier on a per-query basis in Google Datalab. I've submitted a pull request for this feature.

Need to try out bigquery and google cloud sql free package, am asked to enable billing before creating an instance

Members, I have been trying to learn how to use google bigquery and the cloud sql though I have had a challenge with enabling billing issues, this is all because I needed is to have a free access package.
Question:
Is there a free package to enable me practice google cloud sql and bigquey, if yes please get me the link.
Besides any one experiencing the same problem?
This topic is not a programming question, so I will close it.
FYI:
BigQuery offers a free query tier for all users (the first 100 GB of data processed per month is at no charge). If you plan on using your own data, and not just test BigQuery with our sample public datasets, then you must enable billing, as there is no free storage tier. See: https://developers.google.com/bigquery/pricing
The D0 tier of Cloud SQL is less than a dollar a day, see:
https://developers.google.com/cloud-sql/docs/billing