{"record":{"id":"ed21c6b2d25beb56","repo":"apache/seatunnel","slug":"posthog-source-connector-only-supports-batch-mode","errorCode":null,"errorMessage":"PostHog source connector only supports batch mode","messagePattern":"PostHog source connector only supports batch mode","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-http/connector-http-posthog/src/main/java/org/apache/seatunnel/connectors/seatunnel/posthog/source/PostHogSource.java","lineNumber":62,"sourceCode":"    public PostHogSource(ReadonlyConfig pluginConfig) {\n        sourceParameter.buildWithConfig(pluginConfig);\n        catalogTable = CatalogTableUtil.buildWithConfig(pluginConfig);\n    }\n\n    @Override\n    public String getPluginName() {\n        return PLUGIN_NAME;\n    }\n\n    @Override\n    public void setJobContext(JobContext jobContext) {\n        this.jobContext = jobContext;\n    }\n\n    @Override\n    public Boundedness getBoundedness() {\n        if (!JobMode.BATCH.equals(jobContext.getJobMode())) {\n            throw new UnsupportedOperationException(\n                    \"PostHog source connector only supports batch mode\");\n        }\n        return Boundedness.BOUNDED;\n    }\n\n    @Override\n    public List<CatalogTable> getProducedCatalogTables() {\n        return Collections.singletonList(catalogTable);\n    }\n\n    @Override\n    public AbstractSingleSplitReader<SeaTunnelRow> createReader(\n            SingleSplitReaderContext readerContext) {\n        return new PostHogSourceReader(\n                sourceParameter,\n                readerContext,\n                new JsonDeserializationSchema(catalogTable, false, false),\n                catalogTable.getSeaTunnelRowType());","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-http/connector-http-posthog/src/main/java/org/apache/seatunnel/connectors/seatunnel/posthog/source/PostHogSource.java#L44-L80","documentation":"The PostHog source connector only supports batch mode. Its getBoundedness() implementation throws UnsupportedOperationException when job mode is not BATCH; unlike Gitlab/Jira it throws proactively even in the check, returning BOUNDED only for batch jobs. It is invoked during job initialization and by tests like shouldRequireStreamingModeWithCheckpointing.","triggerScenarios":"Submitting a SeaTunnel job with job.mode = STREAMING (or any non-BATCH mode) using the PostHog source; getBoundedness() is called at startup and throws immediately.","commonSituations":"Using a streaming template config with PostHog as source, or assuming the PostHog export API supports continuous polling.","solutions":["Set job.mode = BATCH in the env block of the job config.","Schedule the batch PostHog export job periodically (cron/airflow) instead of running it in streaming mode.","Switch to a connector with genuine streaming support if continuous ingestion is required."],"exampleFix":"// before\nenv {\n  job.mode = \"STREAMING\"\n}\n\n// after\nenv {\n  job.mode = \"BATCH\"\n}","handlingStrategy":"validation","validationCode":"String jobMode = config.getString(\"job.mode\");\nif (!\"BATCH\".equalsIgnoreCase(jobMode)) {\n    throw new IllegalArgumentException(\"PostHog source requires job.mode = BATCH, got: \" + jobMode);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set job.mode = BATCH for all PostHog source jobs.","Schedule periodic batch exports instead of streaming runs.","Document batch-only connectors in your team's config templates."],"tags":["seatunnel","connector","batch-mode","posthog"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}