[google_workspace] - Updated google drive event schema and mappings to incorporate missing fields and avoid conflicts #10633
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.


Type of change
Proposed commit message
WHAT: Updated google drive event schema and mappings to incorporate missing fields and avoid conflicts.
WHY: It seems that there are some drive events that contain certain fields which were unmapped. The fields in question are as follows: -
as defined here. The only exception is the field owner_is_team_drive, which seems to be present in certain events but does not have an explicit definition anywhere. This also creates a scenario where for certain logs the target_user and target are both present in the source event, where they have different meanings and are not the same, hence target has to be mapped conditionally on our end.
Sample Log:
{ "actor": { "email": "[john.doe@example.com](mailto:john.doe@example.com)", "profileId": "987654" }, "etag": "-xyz1234567890/abcdefg", "events": { "name": "email_as_attachment", "parameters": [ { "name": "target", "value": "[jane.smith@example.org](mailto:jane.smith@example.org)" }, { "name": "target_user", "value": "[manager@example.com](mailto:manager@example.com)" }, { "boolValue": true, "name": "primary_event" }, { "boolValue": true, "name": "billable" }, { "boolValue": false, "name": "owner_is_shared_drive" }, { "name": "owner", "value": "[admin@example.co](mailto:admin@example.co)" }, { "name": "doc_id", "value": "doc123-456" }, { "name": "doc_type", "value": "spreadsheet" }, { "boolValue": false, "name": "is_encrypted" }, { "name": "doc_title", "value": "Quarterly Report" }, { "name": "visibility", "value": "shared_externally" }, { "boolValue": false, "name": "actor_is_collaborator_account" }, { "boolValue": false, "name": "owner_is_team_drive" } ], "type": "access" }, "id": { "applicationName": "drive", "customerId": "customer12345", "time": "2024-07-29T12:34:56.789Z", "uniqueQualifier": "4567890" }, "kind": "admin#reports#activity" }Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots