Resource: Query
Returned when you request a list of queries or a specific query. Also, used by customer to create and update a query.
JSON representation | |
---|---|
{ "queryName": string, "queryText": string, "parameterTypes": { string: { object( |
Fields | |
---|---|
queryName |
Query's unique name. |
queryText |
Query text. |
parameterTypes |
Any additional parameters expected by the query. Maps each argument name to its argument type. An object containing a list of |
mergeSpec |
Instructions for row merging. If present, then any rows that would have been dropped for privacy will be combined into one. This will be included in the result if the merged row meets privacy restrictions. |
isGlobal |
True if the query is defined as global; otherwise the query can be used only by a particular customer (or set of customers). |
queryState |
This field defines whether a query is still in development. If it is in development, it should not be executable except by admin user. |
queryVersion |
Define what version of the api query must be run in. |
lastUpdatedMillis |
Timestamp for when query was last updated. |
lastUpdateEmail |
Email address of who last updated the query. |
creatorEmail |
Email address of who created the query. |
MergeSpec
Merge instructions for a result schema.
JSON representation | |
---|---|
{
"column": {
string: {
object( |
Fields | |
---|---|
column |
Instructions for merging each column, keyed by name. Any missing columns will be treated as MERGE_TYPE_UNSPECIFIED. An object containing a list of |
QueryState
The list of states that a query can be in.
Enums | |
---|---|
QUERY_STATE_UNSPECIFIED |
Query state is unspecified. |
QUERY_STATE_RUNNABLE |
Query is available to be run by customer. |
QUERY_STATE_DEVELOPMENT |
Query is not visible to any non-admin user. |
QUERY_STATE_DRAFT |
Customer has created query but has not enabled it yet. |
QUERY_STATE_DELETED |
Query has been soft deleted. Deletion could have been by full-circle or by the customer |
QUERY_STATE_WHITELISTED |
Query has been created by a member of Ads Data Hub. Queries with this state will bypass certain checks. Also, queries with this state cannot be updated by external customer. |
QueryVersion
List of api versions that a query can be run on.
Enums | |
---|---|
QUERY_VERSION_UNSPECIFIED |
version unspecified |
QUERY_VERSION_1 |
API version 1 |
QUERY_VERSION_2 |
Run through query mod service |
Methods |
|
---|---|
|
Creates and stores a query for later execution. |
|
Deletes a stored query. |
|
Synchronously executes the query defined in ExecuteQueryRequest. |
|
Retrieves every query to which a customer has access. |
|
Updates an existing query. |
|
Renames an existing query. |
|
Starts execution for a stored query. |