[ 
https://issues.apache.org/jira/browse/FLINK-31275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17785782#comment-17785782
 ] 

Fang Yong commented on FLINK-31275:
-----------------------------------

[~mobuchowski] Sorry for the late reply, I think I get your point now and thank 
you for your valuable suggestions.

Based on our discussion, I think we can add facets in the `LineageVertex` as 
follows.

{code:java}
public interface LineageVertex {
   /* Facets for the lineage vertex to describe the information of source/sink. 
*/
    Map<String, Facet> facets;
    /* Config for the lineage vertex contains all the options for the 
connector. */
    Map<String, String> config;
}
{code}

We can implement some common facets such as `ConnectorFacet`, `StreamingFacet`, 
`SchemaFacet`. We can add new `Facet` implementations as needed in the future.
For `TableLineageVertex` we can create facets from config in table ddl which 
will make the table options meaningful.
For datastream jobs we can create facts from data source and sink.

{code:java}
/** Connector facet has name and address for the connector, for example, jdbc 
and url for jdbc connector, kafka and server for kafka connector. */
public interface ConnectorFacet extends Facet {
    String name();
    String address();
}

/** Fact for streaming connector. */
public interface StreamingFacet {
    String topic();
    String group();
    String format();
    String start();
}

/** Fact for schema in connector. */
public interface SchemaFacet {
    Map<String, String> fields();
}
{code}

What do you think of this? Thanks



> Flink supports reporting and storage of source/sink tables relationship
> -----------------------------------------------------------------------
>
>                 Key: FLINK-31275
>                 URL: https://issues.apache.org/jira/browse/FLINK-31275
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>    Affects Versions: 1.18.0
>            Reporter: Fang Yong
>            Assignee: Fang Yong
>            Priority: Major
>
> FLIP-314 has been accepted 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-314%3A+Support+Customized+Job+Lineage+Listener



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to