MCPcopy Create free account
hub / github.com/OpenDCAI/DataFlow-MM / __init__

Method __init__

dataflow/utils/storage.py:318–351  ·  view source on GitHub ↗

db_config: { 'host': 'localhost', 'port': 9000, 'user': 'default', 'password': '', 'database': 'dataflow', 'table': 'dataflow_table' } pipeline_id: str, 当前 pipeline 的标识(可选,默认 None) input_task_id:

(
        self,
        db_config: dict,
        pipeline_id: str = None,
        input_task_id: str = None,
        output_task_id: str = None,
        page_size: int = 10000,
        page_num: int = 0
    )

Source from the content-addressed store, hash-verified

316 self.page_num = 0
317
318 def __init__(
319 self,
320 db_config: dict,
321 pipeline_id: str = None,
322 input_task_id: str = None,
323 output_task_id: str = None,
324 page_size: int = 10000,
325 page_num: int = 0
326 ):
327 """
328 db_config: {
329 'host': 'localhost',
330 'port': 9000,
331 'user': 'default',
332 'password': '',
333 'database': 'dataflow',
334 'table': 'dataflow_table'
335 }
336 pipeline_id: str, 当前 pipeline 的标识(可选,默认 None)
337 input_task_id: str, 输入任务的标识(可选,默认 None)
338 output_task_id: str, 输出任务的标识(可选,默认 None)
339 page_size: int, 分页时每页的记录数(默认 10000)
340 page_num: int, 当前页码(默认 0)
341 """
342 self.db_config = db_config
343 self.client = get_clickhouse_client(db_config)
344 self.table = db_config.get('table', 'dataflow_table')
345 self.logger = get_logger()
346 self.pipeline_id: str = pipeline_id
347 self.input_task_id: str = input_task_id
348 self.output_task_id: str = output_task_id
349 self.page_size: int = page_size
350 self.page_num: int = page_num
351 self.validate_required_params()
352
353 def read(self, output_type: Literal["dataframe", "dict"]) -> Any:
354 """

Callers

nothing calls this directly

Calls 4

get_loggerFunction · 0.90
get_clickhouse_clientFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected