mirror of
https://github.com/OpenSPG/openspg.git
synced 2025-07-28 11:32:37 +00:00
40 lines
785 B
Python
40 lines
785 B
Python
from abc import ABC
|
|
from ctypes import Union
|
|
from typing import Dict
|
|
|
|
from knext.component.base import Runnable
|
|
from knext.component.builder.base import SinkWriter
|
|
|
|
|
|
class KGSinkWriter(SinkWriter):
|
|
"""The Sink Component that writing data to KG storage.
|
|
|
|
Args:
|
|
None
|
|
Examples:
|
|
sink = KGSinkWriter()
|
|
|
|
"""
|
|
|
|
@property
|
|
def input_types(self):
|
|
return Dict[str, str]
|
|
|
|
@property
|
|
def output_types(self):
|
|
return None
|
|
|
|
def invoke(self, input):
|
|
pass
|
|
|
|
def to_rest(self):
|
|
"""Transforms `SinkToKgComponent` to REST model `GraphStoreSinkNodeConfig`."""
|
|
return dict(
|
|
{
|
|
"properties": {},
|
|
},
|
|
**super().to_dict(),
|
|
)
|
|
|
|
def submit(self):
|
|
pass |