tableau icon indicating copy to clipboard operation
tableau copied to clipboard

analysis(graph): generate book and sheet relation graph

Open wenchy opened this issue 2 years ago • 0 comments

Relation Graph

  • [ ] Sheet options
    • [ ] Merger
    • [ ] Scatter
  • [ ] Field properties
    • [ ] refer
message Graph {
    map<string, Book> books = 1; // book name -> Book
    message Book {
        string alias = 1; // alias
        map<string, Sheet> sheets = 2; // sheet name -> Sheet
    }
    message Sheet {
        string alias = 1; // alias
        Primary primary = 2;
    }
    message Primary {
        string book_name = 1;
        string sheet_name = 2;
        RelationType relation_type = 3; 
    }
    enum RelationType {
        RELATION_TYPE_MERGER = 1;
        RELATION_TYPE_SCATTER = 2;
        RELATION_TYPE_REFER = 3;
    }
}

DAG

For perfect visualization, we can create a DAG and render it to SVG or PNG.

  • https://github.com/heimdalr/dag
  • https://pkg.go.dev/internal/dag
  • ✅ https://github.com/dominikbraun/graph
  • ✅ https://github.com/goccy/go-graphviz

wenchy avatar Jun 13 '23 04:06 wenchy