Git Product home page Git Product logo

alligator2's People

Contributors

dependabot[bot] avatar donaldseaton avatar dulacp avatar hectorparragoogle avatar miguelfc avatar mohabfekry avatar tonycoco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alligator2's Issues

sql questor

hello,
i have done a python file to automatically generate SQL table needed to be used in the datastudio sample that you provided (i am new to notebook usage and more confident with directly writting scripts (yes i am a boomer)
as i am quite new with python, it has been quite hard for me to understand that after the main.py, i had to ingest queries that were in sql directory to use it in the sample...
may be that could help
i agreed with Google participation policies, but can't for now upload anything so i put it there...
and thanks for this very usefull work :)
sql_questor.py.txt

Tool usage check

Is this tool helpful for the agencies that manages multiple GBP profiles? If you then how to do the configuration for the same?

Regards,
Raghvendra Mishra

GMB API Deprecations Update

TL;DR: We have updated Alligator to align with the GMB API deprecations happening on Apr. 30. There are some scheme changes in the locations table that might require manual steps in BigQuery and Data Studio.

Hello Alligator 2.0 community,

As we announced last year, the GMB API is changing to a new federated model, and the migration is happening progressively.

On April 30, locations will be available only through API Business Information v1. With that in mind, we have released a new version of Alligator that uses this new endpoint to retrieve the locations, but this implies a new schema for the location objects coming from the new API endpoint.

In practical terms, the functionality offered by Alligator remains the same, but the Locations table will have a new schema that is not compatible with the previous version, so the customer will need to remove the Locations table before running the new version of Alligator, otherwise it will fail.

If you are using Data Studio (or any other visualization tool), you might need to modify the connectors or views as well (we updated the sample SQL files used to generate the views in BigQuery to reflect the new schema).

The deadline to migrate to the new Alligator version is April 30, after which the old locations endpoint will stop working on the GMB API side.

Thanks!

โ€“ The Google Team

Getting Authorization Error on browser

When I run project with specified command: python main.py --project_id='my-proj-id'

It spits out a url to paste to in browser for authentication. When I paste the URL on browser, I get following error:

Error 400: redirect_uri_mismatch
The redirect URI in the request, urn:ietf:wg:oauth:2.0:oob, can only be used by a Client ID for native application. It is not allowed for the WEB client type. You can create a Client ID for native application at https://console.developers.google.com/apis/credentials/oauthclient

I generated the oAuth credentials for web application. Can you please tell what do I need to setup to make this code work?

Incomplete import on multi-accounts set-up

Hello,

I have a multi-account set-up on my Google My Business and I need to extract insights and reviews to analyse them on BigQuery.
I have mounted the alligator2 repo on a VM with Compute Engine.
Nevertheless my last import, which was completed without errors gave out uncompleted results.

As a patch, we tried to download the data on an account by account basis, which lead to incomplete results as well.

What is the most surprising is that on previous import, the account by account way was functionnal.
Thank you for that repository which is of great help.

Can Alligator be run as a background job?

Is it possible to run it as a headless user (may be by using a service account not sure)?

I want to schedule this to run with certain frequency rather than a one time activity so manually providing access token is not an option.

Request contains an invalid argument 'read_mask', says 'Field is required'

Hey all, I think this repo is a really cool and I'd like to try it out, but I get this error when I run main.py that says I have an invalid argument and that "read_mask" is required. Seems like it's triggered when it tries to pull locations for my account.

Traceback (most recent call last):
  File "C:\Users\awalker1\AppData\Local\JetBrains\PyCharm 2021.2.3\plugins\python\helpers\pydev\pydevd.py", line 1483, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:\Users\awalker1\AppData\Local\JetBrains\PyCharm 2021.2.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:/Users/awalker1/Projects/alligator2-master/main.py", line 238, in <module>
    main(sys.argv[1:])
  File "C:/Users/awalker1/Projects/alligator2-master/main.py", line 230, in main
    Alligator.for_account(project_id, account_id, language, flags)
  File "C:/Users/awalker1/Projects/alligator2-master/main.py", line 59, in for_account
    locations = api.locations(u"accounts/{}".format(account_id))
  File "C:\Users\awalker1\Projects\alligator2-master\api.py", line 135, in locations
    response_json = self.gmb_service.accounts().locations().list(
  File "C:\Users\awalker1\Projects\venv\lib\site-packages\googleapiclient\_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Users\awalker1\Projects\venv\lib\site-packages\googleapiclient\http.py", line 935, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://mybusinessbusinessinformation.googleapis.com/v1/accounts/redacted_account_number/locations?alt=json returned "Request contains an invalid argument.". Details: "[{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'read_mask', 'description': 'Field is required'}]}]">

Maybe it's caused by a discovery docs changing? Let me know if more info is needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.