38 lines
699 B
Python
Raw Normal View History

2023-12-08 11:25:26 +08:00
from typing import Dict
2023-12-06 17:26:39 +08:00
2023-12-08 11:25:26 +08:00
from knext.component.builder.base import SinkWriter
2023-12-06 17:26:39 +08:00
2023-12-08 11:25:26 +08:00
class KGSinkWriter(SinkWriter):
2023-12-06 17:26:39 +08:00
"""The Sink Component that writing data to KG storage.
Args:
None
Examples:
sink = KGSinkWriter()
"""
@property
2023-12-08 11:25:26 +08:00
def input_types(self):
2023-12-06 17:26:39 +08:00
return Dict[str, str]
@property
2023-12-08 11:25:26 +08:00
def output_types(self):
2023-12-06 17:26:39 +08:00
return None
2023-12-08 11:25:26 +08:00
def invoke(self, input):
2023-12-06 17:26:39 +08:00
pass
def to_rest(self):
"""Transforms `SinkToKgComponent` to REST model `GraphStoreSinkNodeConfig`."""
return dict(
{
"properties": {},
},
**super().to_dict(),
)
2023-12-08 11:25:26 +08:00
def submit(self):
2023-12-11 10:44:37 +08:00
pass