CodeWithPravinMaske opened a new pull request, #13771:
URL: https://github.com/apache/seatunnel/pull/13771

   ### Purpose of this pull request
   Adds a CleverTap source connector (`connector-http-clevertap`). It reads the 
records of one event through CleverTap's two-step [Get Events 
API](https://developer.clevertap.com/docs/get-events-api): a POST returns a 
cursor for the event and date range, then GET calls follow `next_cursor` until 
the export ends. It also retries while CleverTap answers "request still in 
progress". Bounded batch source, built on `connector-http-base` like the 
PostHog connector.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, a new `CleverTap` source. Docs added in `docs/en` and `docs/zh`.
   
   ```hocon
   source {
     CleverTap {
       region = "in1"
       account_id = "${CLEVERTAP_ACCOUNT_ID}"
       passcode = "${CLEVERTAP_PASSCODE}"
       event_name = "App Launched"
       from_date = 20240101
       to_date = 20240131
       schema = { fields { ts = bigint, profile = { objectId = string, email = 
string }, event_props = string } }
     }
   }
   ```
   
   Not covered: notification events (not returned by this API), and the `app` / 
`profile` / `events` request flags.
   
   ### How was this patch tested?
   - `./mvnw -pl 
seatunnel-connectors-v2/connector-http/connector-http-clevertap install`: 11 
tests and the Spotless check pass. They cover parameter validation, cursor 
paging, empty range, in-progress retry, 401 / expired-cursor / missing-cursor 
errors, and `CleverTapSourceHttpTest`, which runs the reader with the real HTTP 
client against a local stand-in server (paging, retry, wrong passcode).
   - Ran a local job (`seatunnel.sh -m local`, Console sink) against a mock 
CleverTap server using `base_url`: 3 rows read and written, 0 failed; the mock 
saw the account headers, the request body and the cursor sequence `c1, c1 (in 
progress), c2`.
   - Not yet tried against a real CleverTap account.
   
   **Try it without a CleverTap account:** 
[clevertap-demo](https://github.com/CodeWithPravinMaske/seatunnel/tree/pr-assets/clevertap-demo)
 has a mock CleverTap server, a dummy-credential job and a `run.sh` (see its 
README). `./run.sh` reads 3 rows; `./run.sh --bad` shows the 401 error.
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
   * [x] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If necessary, please update `incompatible-changes.md` to describe the 
incompatibility caused by this PR.
   * [x] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
 and add new connector information in it
     2. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     5. Update connector 
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] [Feature][Connector-V2] ... CodeWithPravinMaske (via GitHub) via commits

Reply via email to