Skip to content

Commit 158bc9d

Browse files
authored
Snowflake: warehouse switching agent only (#2493)
* Snowflake: support warehouse switching * Snowflake: warehouse switching agent only
1 parent 0bd4552 commit 158bc9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

soda-core/src/soda_core/contracts/impl/contract_verification_impl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ def verify(self) -> ContractVerificationResult:
614614
and self.datasource_warehouse
615615
and self.compute_warehouse
616616
and self.datasource_warehouse != self.compute_warehouse
617+
and self.soda_config.is_running_on_agent
617618
):
618619
logger.info(
619620
f"Switching warehouse from '{self.datasource_warehouse}' to '{self.compute_warehouse}' for Contract verification of dataset '{self.dataset_identifier.to_string()}'"
@@ -751,6 +752,7 @@ def verify(self) -> ContractVerificationResult:
751752
and self.compute_warehouse
752753
and self.datasource_warehouse
753754
and self.datasource_warehouse != self.compute_warehouse
755+
and self.soda_config.is_running_on_agent
754756
):
755757
logger.info(
756758
f"Switching back warehouse to '{self.datasource_warehouse}' after Contract verification of dataset '{self.dataset_identifier.to_string()}'"

0 commit comments

Comments
 (0)