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

   ### Purpose of this pull request
   
   Related to #10753.
   
   This adds a PostHog source connector as a bounded batch source.
   
   The connector:
   
   - Executes one blocking HogQL query through PostHog's Query API.
   - Maps the returned `columns` and `results` arrays to the configured 
SeaTunnel schema.
   - Validates query errors, incomplete responses, duplicate columns, row 
widths, and missing schema columns.
   - Supports PostHog US Cloud, EU Cloud, and self-hosted base URLs.
   - Reuses the existing HTTP client, retry configuration, and JSON 
deserialization path.
   - Adds connector registration, English and Chinese documentation, unit 
tests, and MockServer E2E coverage.
   
   The connector does not use the deprecated events-list API. Large historical 
exports remain outside this bounded-query source and should use PostHog Batch 
Exports.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes.
   
   Users can configure `PostHog` as a source and read the result of a HogQL 
query into a SeaTunnel batch job.
   
   ### How was this patch tested?
   
   Added 15 unit tests covering:
   
   - Request URL, authentication headers, query body, and case-insensitive 
reserved headers.
   - Column-oriented response conversion.
   - Empty results.
   - Query errors and incomplete blocking queries.
   - Invalid JSON and response shapes.
   - Duplicate, missing, and mismatched columns.
   
   Added a MockServer E2E case that verifies the PostHog request and sends two 
query-result rows to the Assert sink.
   
   Verified locally with:
   
   ```shell
   ./mvnw -pl seatunnel-connectors-v2/connector-http/connector-http-posthog 
clean test
   ./mvnw -q -DskipTests -Dskip.ui=true verify
   ```
   
   Local Testcontainers execution was blocked before the E2E test started 
because the repository's Testcontainers 1.17.6 client could not negotiate with 
Docker Desktop 29.5.3. The E2E case is included for CI verification.
   
   ### Check list
   
   * [x] No new third-party Jar binary package is added.
   * [x] English and Chinese connector documentation is included.
   * [x] No incompatible change is introduced.
   * [x] `plugin-mapping.properties` includes the PostHog source.
   * [x] `seatunnel-dist` includes the connector module.
   * [x] The existing HTTP connector CI label scope covers this module.
   * [x] MockServer E2E coverage is included.
   * [x] `config/plugin_config` includes the connector.


-- 
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]

Reply via email to