Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

greenhouse: activity_feed should be flattened #215

Open
mdibaiee opened this issue Jul 5, 2023 · 0 comments
Open

greenhouse: activity_feed should be flattened #215

mdibaiee opened this issue Jul 5, 2023 · 0 comments

Comments

@mdibaiee
Copy link
Member

mdibaiee commented Jul 5, 2023

I think the issue is very similar to what we have seen before: an array API response which should actually be flattened, but is just emitted as-is (previously we have seen this with amazon ads). The only solution is to patch the connector to emit individual objects from the response arrays instead of just emitting the whole document

The API endpoint is: https://developers.greenhouse.io/harvest.html#the-activity-feed-object

Output example:

  "notes": [
    {
      "id": 123456,
      "created_at": "2014-03-26T20:11:40Z",
      "body": "Very mysterious.",
      "user": {
        "id": 512,
        "first_name": "Sayid",
        "last_name": "Jarrah",
        "name": "Sayid Jarrah",
        "employee_id": "12345"
      },
      "private": false,
      "visiblity": "public",
      "visibility": "public"
    }
  ],
  "emails": [
    {
      "id": 234675,
      "created_at": "2014-04-01T15:55:06Z",
      "subject": "Regarding your application",
      "body": "Hey John,  just wanted to touch base!",
      "to": "[email protected]",
      "from": "[email protected]",
      "cc": "[email protected]",
      "user": {
        "id": 214,
        "first_name": "Boone",
        "last_name": "Carlyle",
        "name": "Boone Carlyle",
        "employee_id": "67890"
      }
    }
  ],
  "activities": [
    {
      "id": 6756789,
      "created_at": "2014-04-01T15:55:29Z",
      "subject": "Candidate Rejected",
      "body": "Reason: Lacking hustle\n\nThis candidate turned out to be problematic for us...",
      "user": {
        "id": 214,
        "first_name": "Boone",
        "last_name": "Carlyle",
        "name": "Boone Carlyle",
        "employee_id": "67890"
      }
    },
    {
      "id": 6757869,
      "created_at": "2014-03-26T20:26:38Z",
      "subject": "Candidate Stage Change",
      "body": "John Locke was moved into Recruiter Phone Screen for Accounting Manager on 03/27/2014 by Boone Carlyle",
      "user": {
        "id": 214,
        "first_name": "Boone",
        "last_name": "Carlyle",
        "name": "Boone Carlyle",
        "employee_id": "67890"
      }
    }
  ]
}

This connector has a single stream called activity_feed which just outputs this, but instead I think we need to have three different streams: activity_feed_notes, activity_feed_emails and activity_feed_activities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant