Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions posthog/temporal/data_imports/external_data_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ async def run(self, inputs: ExternalDataWorkflowInputs):
billable=inputs.billable,
)

job_id, incremental, source_type = await workflow.execute_activity(
job_id, incremental_or_append, source_type = await workflow.execute_activity(
create_external_data_job_model_activity,
create_external_data_job_inputs,
start_to_close_timeout=dt.timedelta(minutes=1),
Expand Down Expand Up @@ -288,7 +288,7 @@ async def run(self, inputs: ExternalDataWorkflowInputs):
maximum_attempts=9, non_retryable_error_types=["NonRetryableException"]
),
}
if incremental or is_resumable_source
if incremental_or_append or is_resumable_source
else {
"start_to_close_timeout": dt.timedelta(hours=24),
"retry_policy": RetryPolicy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def create_external_data_job_model_activity(
f"Created external data job for external data source {inputs.source_id}",
)

return str(job.id), schema.is_incremental, source.source_type
return str(job.id), schema.is_incremental or schema.is_append, source.source_type
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using the existing schema.should_use_incremental_field property instead of schema.is_incremental or schema.is_append. The model already defines this property (line 90-91 in external_data_schema.py) with the same logic, which would improve consistency and maintainability.

Suggested change
return str(job.id), schema.is_incremental or schema.is_append, source.source_type
return str(job.id), schema.should_use_incremental_field, source.source_type

Copilot uses AI. Check for mistakes.
except Exception as e:
logger.exception(
f"External data job failed on create_external_data_job_model_activity for {str(inputs.source_id)} with error: {e}"
Expand Down
Loading