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 and thmsobrmlr committed Jun 24, 2024
1 parent ce2dd80 commit 74be403
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 74be403

Please sign in to comment.