Skip to content

Commit

Permalink
chore(data-warehouse): differentiate paths for pipeline (#18977)
Browse files Browse the repository at this point in the history
differentiate paths for pipeline
  • Loading branch information
EDsCODE authored Nov 29, 2023
1 parent b9db624 commit 4da5395
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion posthog/warehouse/data_load/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from posthog.warehouse.models import ExternalDataSource

from .stripe import ENDPOINTS, stripe_source
import os


@dataclass
Expand All @@ -20,8 +21,11 @@ class PipelineInputs:


def create_pipeline(inputs: PipelineInputs):
pipeline_name = f"{inputs.job_type}_pipeline_{inputs.team_id}"
pipelines_dir = f"{os.getcwd()}/.dlt/{inputs.team_id}/{inputs.job_type}"
return dlt.pipeline(
pipeline_name=f"{inputs.job_type}_pipeline",
pipeline_name=pipeline_name,
pipelines_dir=pipelines_dir, # workers can be created and destroyed so it doesn't matter where the metadata gets put temporarily
destination="filesystem",
dataset_name=inputs.dataset_name,
credentials={
Expand Down

0 comments on commit 4da5395

Please sign in to comment.