Generating GAQL tool
Generating GAQL (Google Ads Query Language) tool, it is not official library. Would you like to build GAQL string more easier, you can use this tool, but it would not be validated entirely for all of posible pairing.
Please follow official documentation.
- Python 2.7.13+ / 3.5.3+
$ pip instal gaql-builder
If you want to generate the following query string,
SELECT campaign.id, campaign.name FROM campaign WHERE campaign.resource_name = 'customers/1234567/campaigns/987654'
you can use functional call to make it out.
builder = GAQLBuilder() builder.select(['campaign.id', 'campaign.name']) builder.resource_from('campaign') builder.where("campaign.resource_name = 'customers/1234567/campaigns/987654'") builder.to_string()
also, you can use
add_where function to add condition.
builder = GAQLBuilder() builder.select(['campaign.id', 'campaign.name']) builder.resource_from('campaign') builder.add_where( field='campaign.resource_name', operator='=', value="'customers/1234567/campaigns/987654'" )
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size gaql_builder-1.0.1-py3-none-any.whl (4.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size gaql-builder-1.0.1.tar.gz (3.0 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for gaql_builder-1.0.1-py3-none-any.whl