Skip to content

Commit

Permalink
fix(data-warehouse): restore folder path logic (#23133)
Browse files Browse the repository at this point in the history
* restore folder path logic

* too many lines
  • Loading branch information
EDsCODE authored Jun 20, 2024
1 parent 7b9bf83 commit 5d44b12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion posthog/warehouse/models/external_data_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ class Status(models.TextChoices):

@property
def folder_path(self) -> str:
return f"team_{self.team_id}_{self.pipeline.source_type}_{str(self.schema_id)}".lower().replace("-", "_")
if self.schema and self.schema.is_incremental:
return f"team_{self.team_id}_{self.pipeline.source_type}_{str(self.schema.pk)}".lower().replace("-", "_")

return f"team_{self.team_id}_{self.pipeline.source_type}_{str(self.pk)}".lower().replace("-", "_")

def url_pattern_by_schema(self, schema: str) -> str:
if TEST:
Expand Down

0 comments on commit 5d44b12

Please sign in to comment.