Skip to content

Commit

Permalink
too many lines
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE committed Jun 20, 2024
1 parent ef01c10 commit 026de44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions posthog/warehouse/models/external_data_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.conf import settings
from posthog.models.team import Team
from posthog.models.utils import CreatedMetaFields, UUIDModel, sane_repr
from posthog.settings import TEST
from posthog.warehouse.s3 import get_s3_client
from uuid import UUID
from posthog.warehouse.util import database_sync_to_async
Expand Down Expand Up @@ -38,6 +39,11 @@ def folder_path(self) -> str:
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:
return (
f"http://{settings.AIRBYTE_BUCKET_DOMAIN}/test-pipeline/{self.folder_path}/{schema.lower()}/*.parquet"
)

return f"https://{settings.AIRBYTE_BUCKET_DOMAIN}/dlt/{self.folder_path}/{schema.lower()}/*.parquet"

def delete_data_in_bucket(self) -> None:
Expand Down

0 comments on commit 026de44

Please sign in to comment.