ga:adCost returning 0 in query builder - google-analytics-api

I have been using Google Analytics Query Builder Tool(https://ga-dev-tools.appspot.com/query-explorer/) to try and get my Ad cost within a date range but the query is returning 0.
Could anyone advise what I am doing wrong please?
I am getting values correctly from ga:users ect so the builder is working correctly.

Related

Grafana variable section show preview of values although query is wrong

I have a grafana dashboard. In this dashboard i created a variable. The sql query is wrong.
My datasource is : ansdatabase
wrong query : select client from ansdatabase
Right query : select client from clienttable
Strange thing is. When i open variables page and write wrong query and save it. Below page shows preview of values. But there shouldnt be any values there. Also page throws an error that it couldnt find ansdatabase table. It is normal because ansdatabase is not a table name.
You must have done the right query before (select client from clienttable) correct? Grafana keeps the values from the last valid query.

Prometheus QL get the first values from the query result

I write the query below to get the up time for the microvices.
base_jvm_uptime_seconds{kubernetes_name="namepspce1"}
However, it returns multiple values, so the grafana returns "Only queries that return single series/table is supported". I am wondering how can I the first velus from the query result?
I tried base_jvm_uptime_seconds{kubernetes_name="namepspce1"}[0], but it doesn't work..
Thanks!
I suggest you first inspect the label values of these multiple time series by running the query in Prometheus Graph console.
The you'll need to decide which one you want to display. Random first usually isn't the best idea.
But you can always do topk(1,query) if it helps. Just turn the Instant mode on in the Grafana Query editor.

Boolean query equals works as like

I'm trying to prepare some boolean query for SOLR engine to find some docs with specific locality field. Results that I get seems to be very weird. I cannot give exactly the same code I use because of security policy in my company but trying to simplify this query:
+(ddm/10973/locality_pl_PL:Gdańsk)
And this query return results as expected with Gdańsk city. But when I add some another condition like this:
+(+(ddm/10973/locality_pl_PL:Gdańsk)+(status:0))
In my results I get docs with city Gdańsk and Gdańsk-Wrzeszcz. Suddenly ":" seems to work as a 'like' not 'equals' as expected.
Does somebody know what could be the reason?

Filtering by action_target_id on Facebook Ads API

I am using the Facebook Ads API to try to filter out specific action target ids using the follwowing call:
(account-id)/reportstats?date_preset=yesterday&data_columns=["action_target_name","adgroup_id","adgroup_name","spend","actions","adgroup_objective"]&actions_group_by=["action_target_id", "action_destination"]&filters=[{"field": "action_target_id","type": "contains","value": 'insert id'}]
Every time I try to put in a specific ID, I get an empty data set back. Whenever I change the type to "not_contains", I get every piece of data returned. I've also tried the same with action_destination, but it keeps saying value needs to be numeric even though it a string.
It definitely seems like you can filter by action_target_id because when I tried to filter by something random, it told me that filter doesn't exist.
Can anyone help me please?
Unfortunately these values are nested under the actions fields of the results and filters only work on top level field values.

Using LIKE with parameter expression in query

I was trying to using the like function in iReport 4.0.1. Checked online but none seem to work.
Currently trying to use:
where name LIKE'%$P!{px_name}%'
also tried
'%$P{px_name}%'
but when running the report it comes up saying 'No document'.
But when using where name =$P{px_name} it works perfectly fine.
Where clause will be same as you have used in first step which is :-
where name LIKE '%$P!{px_name}%'
But as you said report says 'The document has no pages' means the query is returning 0 row so just use the same string in LIKE and run the same query in database. Simplest solution is first run the query in database with LIKE operator , if it returns the rows in database then that should also work in iReport.