{"id":21101,"library":"databricks-google-sheets","title":"Databricks Google Sheets Connector","description":"A Python library for reading and writing Google Sheets data from Databricks notebooks. Version 0.8.0 supports Python >=3.6. It wraps the Google Sheets API and provides a simple DataFrame-centric interface. Releases are infrequent; no breaking changes recently announced.","status":"active","version":"0.8.0","language":"python","source_language":"en","source_url":"https://github.com/vbalasu/databricks-google-sheets","tags":["databricks","google-sheets","etl","spark"],"install":[{"cmd":"pip install databricks-google-sheets","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for authentication with Google Sheets API.","package":"google-auth","optional":false},{"reason":"Underlying library to interact with Google Sheets.","package":"gspread","optional":false},{"reason":"Used to represent data as DataFrames.","package":"pandas","optional":false}],"imports":[{"note":"The correct package uses underscores, not dots.","wrong":"from databricks.google_sheets import GoogleSheetsClient","symbol":"GoogleSheetsClient","correct":"from databricks_google_sheets import GoogleSheetsClient"}],"quickstart":{"code":"from databricks_google_sheets import GoogleSheetsClient\nimport os\n\n# Set credentials via environment variables or Databricks secrets\nscope = ['https://www.googleapis.com/auth/spreadsheets']\ncreds = GoogleSheetsClient.get_credentials(\n    service_account_key=os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', '')\n)\nclient = GoogleSheetsClient(creds)\n\n# Read a sheet\nurl = 'https://docs.google.com/spreadsheets/d/your-sheet-id/edit'\ndf = client.read_from_url(url, sheet_name='Sheet1')\nprint(df.head())","lang":"python","description":"Initialize client with service account credentials and read a sheet into a DataFrame."},"warnings":[{"fix":"Store the key file in DBFS or use Databricks secrets with dbutils.secrets.get() and write to a temp file.","message":"The library expects a service account key file path, not JSON string. Use absolute path or Databricks secret scope.","severity":"gotcha","affected_versions":"<=0.8.0"},{"fix":"Implement rate limiting or batch updates using gspread directly if needed.","message":"Google Sheets API quotas are low for free tier. Frequent writes may exceed limits.","severity":"gotcha","affected_versions":"all"},{"fix":"Always convert data to pandas DataFrame before calling write_to_sheet.","message":"The method `write_to_sheet` expects a DataFrame; passing a list may cause silent errors.","severity":"deprecated","affected_versions":">=0.5.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install via pip: pip install databricks-google-sheets. Import with underscores.","cause":"Package not installed or installed under incorrect name (e.g., 'databricks-google-sheets' in pip list).","error":"ModuleNotFoundError: No module named 'databricks_google_sheets'"},{"fix":"Pass a valid path to a service account key JSON file: GoogleSheetsClient.get_credentials(service_account_key='/path/to/key.json')","cause":"Did not provide the service account key JSON file path.","error":"GoogleSheetsClient.get_credentials() missing required positional argument: 'service_account_key'"},{"fix":"Pin google-auth to <=1.35.0 and gspread to <=3.7.0: pip install google-auth==1.35.0 gspread==3.7.0","cause":"Incompatible version of google-auth or gspread. The library expects an older interface.","error":"AttributeError: 'ServiceAccountCredentials' object has no attribute 'to_json'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}