Google Drive
Connect Google Drive with Google consent, choose CSV and JSON files, and read them into datasets.
A Google Drive connection reads CSV and JSON files that you choose from your
Drive. Consent happens on Google's consent screen in your browser, and
Xentropy asks only for the drive.file scope: it can open the files you pick
and nothing else in your Google Drive.
For spreadsheets, use a Google Sheets connection instead.
Set up the connection
A connection holds up to 100 chosen files. A dataset can only read a chosen
file. Reads of any other file fail with PERMISSION_DENIED. If a file is
removed from the connection during a read, that read fails too.
Agents cannot give consent. An agent with connections:manage can start the
flow, but the owner finishes it in a browser.
File formats
| Format | How it is read |
|---|---|
CSV (text/csv, or plain text) | The first line is the header row. Values are typed from the file |
| JSON | An array of records (objects). Each key becomes a field |
Xentropy reads files as UTF-8. Any other file type fails with VALIDATION_FAILED
("Choose a CSV or JSON Drive file."). A JSON file that cannot be parsed fails
with VALIDATION_FAILED ("Drive file is not valid JSON."): fix the file in
Drive, then refresh.
| Limit | Value |
|---|---|
| File size | 8 MB |
| Request timeout | 20 s |
Refreshes and connection health
Every refresh downloads the file again, so a dataset follows edits to the file in Drive. A successful test or read marks the connection healthy. When Google refuses a read, the connection's health records why: a missing permission, or a temporary error such as a rate limit.
If a file is deleted or no longer shared, refreshes fail with
PROVIDER_FILE_NOT_FOUND. If you
revoke Xentropy's access in your Google account, or Google expires the grant,
the read fails with INVALID_GRANT and later reads fail with
RECONNECT_REQUIRED until you reconnect.
Rate limits
Google Drive limits requests per user and per project. When a limit is
reached, Drive answers HTTP 429 or a quota 403 (userRateLimitExceeded,
rateLimitExceeded or quotaExceeded). The read then fails with
PROVIDER_UNAVAILABLE and HTTP status 429. The error is retryable. When Google
says how long to wait, details.retryAt holds that time. A quota limit does
not mark the connection as missing permission.
Errors
| Code | Cause | What to do |
|---|---|---|
VALIDATION_FAILED | The file is not CSV or JSON, the JSON is not valid, or the CSV has no usable header row | Fix the file, or choose a CSV or JSON file |
LIMIT_EXCEEDED | The file is larger than 8 MB | Split the file |
SCHEMA_CHANGED | A selected field was removed from the file | Restore the field, or save a new dataset |
PROVIDER_FILE_NOT_FOUND | The file was deleted, or is no longer shared with your account | Restore the file, or choose another one |
MISSING_PROVIDER_SCOPE | Google denied access to the file, for example because of an account policy | Check the file's sharing and your organization's policy, then reconnect |
INVALID_GRANT, then RECONNECT_REQUIRED | Access was revoked or the grant expired | Reconnect the connection |
PROVIDER_UNAVAILABLE (429) | Drive's rate limit or quota was reached | Retry after details.retryAt, or later. Do not retry in a loop |
PROVIDER_UNAVAILABLE (503) | Google could not be reached or answered with an error | Retry the read later |
PERMISSION_DENIED | The file is not chosen on this connection | Choose it with Choose files |