Skip to content

Commit

Permalink
chore(import-v2): enable v2 sql for allowlist (#27136)
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE authored Dec 23, 2024
1 parent feaf60e commit b9099ec
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from posthog.temporal.data_imports.pipelines.pipeline.pipeline import PipelineNonDLT
from posthog.temporal.data_imports.pipelines.pipeline_sync import DataImportPipelineSync, PipelineInputs
from posthog.temporal.data_imports.util import is_posthog_team
from posthog.temporal.data_imports.util import is_posthog_team, is_enabled_for_team
from posthog.warehouse.models import (
ExternalDataJob,
ExternalDataSource,
Expand Down Expand Up @@ -164,7 +164,9 @@ def import_data_activity_sync(inputs: ImportDataActivityInputs):
ExternalDataSource.Type.MYSQL,
ExternalDataSource.Type.MSSQL,
]:
if is_posthog_team(inputs.team_id):
if is_posthog_team(inputs.team_id) or (
settings.TEMPORAL_TASK_QUEUE == DATA_WAREHOUSE_TASK_QUEUE_V2 and is_enabled_for_team(inputs.team_id)
):
from posthog.temporal.data_imports.pipelines.sql_database_v2 import sql_source_for_type
else:
from posthog.temporal.data_imports.pipelines.sql_database import sql_source_for_type
Expand Down

0 comments on commit b9099ec

Please sign in to comment.