MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / MzcomposeExecutor

Class MzcomposeExecutor

misc/python/materialize/checks/executors.py:56–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56class MzcomposeExecutor(Executor):
57 def __init__(self, composition: Composition) -> None:
58 self.composition = composition
59
60 def mzcompose_composition(self) -> Composition:
61 return self.composition
62
63 def testdrive(
64 self, input: str, caller: Traceback | None = None, mz_service: str | None = None
65 ) -> None:
66 self.composition.testdrive(
67 input,
68 caller=caller,
69 mz_service=mz_service,
70 args=[
71 f"--var=default-sql-server-user={SqlServer.DEFAULT_USER}",
72 f"--var=default-sql-server-password={SqlServer.DEFAULT_SA_PASSWORD}",
73 ],
74 )
75
76 def run_pyaction(
77 self,
78 method: Callable,
79 mz_service: str | None = None,
80 ) -> None:
81 conn = self.composition.sql_connection(mz_service)
82 conn.autocommit = True
83 method(conn)
84
85
86class MzcomposeExecutorParallel(MzcomposeExecutor):

Callers 1

workflow_defaultFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected