Gudu SQLFlow Product Docs
  • 1. Introduction
    • What is Gudu SQLFlow?
      • What SQLFlow can do
      • Architecture Overview
    • Getting Started
      • Sign up a new account
        • Team Management
        • Delete My Account
        • Activate by entering a coupon
      • How to use SQLFlow
      • Different modes in Gudu SQLFlow
        • Query mode
        • Job mode
      • Basic Usage
      • Convert SQL to E-R Diagram
      • Colors in SQLFlow Diagram
      • Show call relationship
    • Installation
      • Version and Users
        • Cloud and On-Premise version
        • SQLFlow before Version 6
          • For older version SQLFlow under Linux
          • For older version SQLFlow under MacOS
          • For older version SQLFlow under Windows
      • Linux
      • MacOS
      • Windows
      • Docker
      • Clickhouse Installation
        • Clickhouse For CentOs
        • Clickhouse For Ubuntu/Debian/RHEL
      • Troubleshooting
      • Upgrade
      • Third Party Components
      • Renew License File
    • UI
      • SQLText Editor
      • Schema Explorer
      • Diagram Panel
      • Settings
      • Job Management
        • Job Sources
    • Dlineage Tool
      • Overview
      • Usage
        • Analyze data linege from SQL files
        • Analyze data linege from a database
        • Resolve the ambiguous columns in SQL query
        • Map the DataFlowAnalyzer and the settings on SQLFlow UI
        • Settings
      • Dataflow.xml structure
      • FAQ
  • 2. CONCEPTS
    • Data Lineage Basics
      • Dataflow
        • Relations generated by SQLFlow
      • Direct Dataflow
      • Indirect Dataflow
      • Aggregate function and Dataflow
      • Dataflow chain
    • Data Lineage Format Reference
  • 3. API Docs
    • Prerequisites
    • Using the Rest API
    • SQLFlow Rest API reference
      • User Interface
      • Generation Interface
        • /sqlflow
        • /sqlflow/selectedgraph/table_level_lineage
        • /sqlflow/selectedgraph/image
        • /sqlflow/graph
        • /sqlflow/graph/table_level_lineage
        • /sqlflow/graph/image
        • /sqlflow/downstreamGraph
        • /sqlflow/upstreamGraph
        • /sqlflow/erdiagramSelectGraph
        • /sqlflow/leftMostSourceTableGraph
      • Job Interface
        • /submitUserJob
        • /displayUserJobSummary
        • /displayUserJobsSummary
        • /exportLineageAsJson
        • /exportFullLineageAsJson
        • /exportLineageAsGraphml
        • /submitPersistJob
        • /displayUserLatestJobTableLevelLineage
      • Export Image
      • Export CSV
        • /sqlflow/exportFullLineageAsCsv
        • /job/exportFullLineageAsCsv
    • Swagger UI
    • Export the data lineage result
    • Python
      • Basic Usage
      • Advanced Usage
    • SQL Parser API
      • checkSyntax
  • 4. SQLFlow Widget
    • Widget Get started
    • Usages
    • Widget API Reference
  • 5. Databases
    • Database Objects
      • Azure
      • DB2
  • 6. SQLFlow-ingester
    • Introduction
      • SQLFlow-Exporter
      • SQLFlow-Extractor
      • SQLFlow-Submitter
    • Get Started
      • SQL Server
    • SQLFlow-Ingester Java API Usage
    • Understand the format of exported data
      • Oracle
      • Microsoft SQL Server
      • MySQL
      • PostgreSQL
    • List of Supported dbVendors
    • Git Repo
    • Third Party Components
  • 7. Reference
    • Lineage Model
      • Json Format Lineage Model
      • XML Format Lineage Model
      • Data Lineage Elements
    • Database Model
  • 8. other
    • FAQ
      • Handling Internal Database
      • Delete Your Account
      • Table Form Data Without Intermediates
      • Not all schema exported from Oracle
      • Lineage Customization
    • Roadmap
    • SQL Samples
      • Exchange table partition
      • Generate relationship for renamed table
      • Snowflake table function lineage detection
    • Change Logs
    • SQLFlow with Oracle XML functions
    • Major Organizations Utilizing SQLFlow
Powered by GitBook
On this page
  1. 3. API Docs
  2. SQLFlow Rest API reference
  3. Generation Interface

/sqlflow/graph

Previous/sqlflow/selectedgraph/imageNext/sqlflow/graph/table_level_lineage

Last updated 1 year ago

Get data lineage in Json

/sqlflow/generation/sqlflow/graph
{
  "code": 200,
  "data": {
    "mode": "global",
    "summary": {
      "schema": 0,
      "process": 0,
      "database": 0,
      "view": 0,
      "mostRelationTables": [
        {
          "table": "EMP"
        },
        {
          "table": "DEPT"
        }
      ],
      "column": 4,
      "relationship": 1,
      "table": 3
    },
    "sqlflow": {
      "dbvendor": "dbvoracle",
      "dbobjs": [
        {
          "id": "4",
          "name": "EMP",
          "type": "table",
          "columns": [
            {
              "id": "5",
              "name": "DEPTID",
              "coordinates": [
                {
                  "x": 1,
                  "y": 35,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 45,
                  "hashCode": "0"
                }
              ]
            },
            {
              "id": "17",
              "name": "ENAME",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ]
            }
          ],
          "coordinates": [
            {
              "x": 1,
              "y": 19,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 22,
              "hashCode": "0"
            }
          ]
        },
        {
          "id": "9",
          "name": "DEPT",
          "type": "table",
          "columns": [
            {
              "id": "10",
              "name": "ID",
              "coordinates": [
                {
                  "x": 1,
                  "y": 48,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 55,
                  "hashCode": "0"
                }
              ]
            }
          ],
          "coordinates": [
            {
              "x": 1,
              "y": 24,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 28,
              "hashCode": "0"
            }
          ]
        },
        {
          "id": "15",
          "name": "PSEUDO_TABLE_INCLUDE_ORPHAN_COLUMN",
          "type": "pseudoTable",
          "columns": [
            {
              "id": "16",
              "name": "ENAME",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ]
            }
          ],
          "coordinates": [
            {
              "x": 1,
              "y": 1,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 35,
              "hashCode": "0"
            }
          ]
        },
        {
          "id": "12",
          "name": "RS-1",
          "type": "select_list",
          "columns": [
            {
              "id": "13",
              "name": "ENAME",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ]
            },
            {
              "id": "11",
              "name": "RELATIONROWS",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ],
              "source": "SYSTEM"
            }
          ],
          "coordinates": [
            {
              "x": 1,
              "y": 8,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 13,
              "hashCode": "0"
            }
          ]
        }
      ],
      "relationships": [
        {
          "id": "1",
          "type": "fdd",
          "effectType": "select",
          "target": {
            "id": "13",
            "column": "ENAME",
            "parentId": "12",
            "parentName": "RS-1",
            "coordinates": [
              {
                "x": 1,
                "y": 8,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 13,
                "hashCode": "0"
              }
            ]
          },
          "sources": [
            {
              "id": "17",
              "column": "ENAME",
              "parentId": "4",
              "parentName": "EMP",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ]
            }
          ]
        },
        {
          "id": "2",
          "type": "fdr",
          "effectType": "select",
          "target": {
            "id": "11",
            "column": "RELATIONROWS",
            "parentId": "12",
            "parentName": "RS-1",
            "coordinates": [
              {
                "x": 1,
                "y": 8,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 13,
                "hashCode": "0"
              }
            ]
          },
          "sources": [
            {
              "id": "5",
              "column": "DEPTID",
              "parentId": "4",
              "parentName": "EMP",
              "clauseType": "where",
              "coordinates": [
                {
                  "x": 1,
                  "y": 35,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 45,
                  "hashCode": "0"
                }
              ]
            },
            {
              "id": "10",
              "column": "ID",
              "parentId": "9",
              "parentName": "DEPT",
              "clauseType": "where",
              "coordinates": [
                {
                  "x": 1,
                  "y": 48,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 55,
                  "hashCode": "0"
                }
              ]
            }
          ]
        }
      ],
      "errors": [
        {
          "errorMessage": "find orphan column(10500) near: ename(1,8)",
          "errorType": "SyntaxHint",
          "coordinates": [
            {
              "x": 1,
              "y": 8,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 13,
              "hashCode": "0"
            }
          ]
        },
        {
          "errorMessage": "Link orphan column [ename] to the first table [emp]",
          "errorType": "LinkOrphanColumn",
          "coordinates": [
            {
              "x": 1,
              "y": 8,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 13,
              "hashCode": "0"
            }
          ]
        }
      ]
    },
    "graph": {
      "relationshipIdMap": {
        "e0": [
          "1",
          "fdd"
        ]
      },
      "elements": {
        "tables": [
          {
            "columns": [
              {
                "height": 16,
                "id": "n0::n0",
                "label": {
                  "content": "ename",
                  "fontFamily": "Segoe UI Symbol",
                  "fontSize": "12",
                  "height": 13.96875,
                  "width": 59,
                  "x": 0,
                  "y": 0
                },
                "width": 160,
                "x": 213,
                "y": -30.000149
              }
            ],
            "height": 41.96875,
            "id": "n0",
            "label": {
              "content": "RS-1",
              "fontFamily": "Segoe UI Symbol",
              "fontSize": "12",
              "height": 17.96875,
              "width": 162,
              "x": 0,
              "y": 0
            },
            "width": 162,
            "x": 212,
            "y": -51.9689
          },
          {
            "columns": [
              {
                "height": 16,
                "id": "n1::n0",
                "label": {
                  "content": "ename",
                  "fontFamily": "Segoe UI Symbol",
                  "fontSize": "12",
                  "height": 13.96875,
                  "width": 59,
                  "x": 0,
                  "y": 0
                },
                "width": 160,
                "x": 1,
                "y": -30.000149
              }
            ],
            "height": 41.96875,
            "id": "n1",
            "label": {
              "content": "emp",
              "fontFamily": "Segoe UI Symbol",
              "fontSize": "12",
              "height": 17.96875,
              "width": 162,
              "x": 0,
              "y": 0
            },
            "width": 162,
            "x": 0,
            "y": -51.9689
          }
        ],
        "edges": [
          {
            "id": "e0",
            "sourceId": "n1::n0",
            "targetId": "n0::n0"
          }
        ]
      },
      "tooltip": {},
      "listIdMap": {
        "n0": [
          "12"
        ],
        "n0::n0": [
          "13"
        ],
        "n1": [
          "4"
        ],
        "n1::n0": [
          "17"
        ]
      }
    }
  },
  "error": "find orphan column(10500) near: ename(1,8)\r\nLink orphan column [ename] to the first table [emp]",
  "sessionId": "1491a5d5071c220ab993aa4d8a2e0e477d83abe4dd976a0c5c56c69e886a9481_1667231780609"
}

Get data lineage image

/sqlflow/generation/sqlflow/graph/image

Return the data lineage image file for the given SQL file.

Sample response:

Check our blog for more details about this endpoint.

https://www.dpriver.com/blog/2023/03/23/visualize-your-data-with-sqlflow-rest-api/
  • Get data lineage in Json
  • POSTgenerate sqlflow graph
  • Get data lineage image
  • POSTgenerate sqlflow graph image

generate sqlflow graph

post

generate sqlflow graph

Query parameters
columnLevelstringOptional

columnLevel

dbvendorstring · enumRequired

database vendor

Default: dbvoraclePossible values:
hideColumnbooleanOptional

whether hide column

Default: falseExample: false
ignoreFunctionbooleanOptional

ignore function

Default: falseExample: false
simpleOutputbooleanOptional

simple output, ignore the intermediate results, defualt is false.

Default: falseExample: false
ignoreRecordSetbooleanOptional

same as simpleOutput, but will keep output of the top level select list, default is false.

Default: falseExample: false
jobIdstringOptional

give the job Id if need to use the job settings and display the job graph

normalizeIdentifierbooleanOptional

whether normalize the Identifier

Default: true
showConstantTablebooleanOptional

whether show constant table

Default: false
showLinkOnlybooleanOptional

whether show link only

Default: true
showRelationTypestringOptional

show relation type, required false, default value is 'fdd', multiple values seperated by comma like fdd,frd,fdr,join. Availables are 'fdd' value of target column from source column, 'frd' the recordset count of target column which is affected by value of source column, 'fdr' value of target column which is affected by the recordset count of source column, 'join' combines rows from two or more tables, based on a related column between them

Default: fdd
showTransformbooleanOptional

whether show transform

Default: false
sqltextstringOptional

sql text from which to generate the sqlflow model

tokenstringRequired

The token is generated from userid and usersecret. It is used in every Api invocation.

treatArgumentsInCountFunctionAsDirectDataflowbooleanOptional

Whether treat the arguments in COUNT function as direct Dataflow

Default: false
userIdstringRequired

the user id of sqlflow web or client

Body
sqlfilestring · binaryOptional

sqlfile

Responses
200
OK
application/json;charset=utf-8
ResponsestringExample: {"code":200,"data":{"mode":"global","summary":{"schema":0,"process":0,"database":0,"view":0,"mostRelationTables":[{"table":"EMP"},{"table":"DEPT"}],"column":4,"relationship":1,"table":3},"sqlflow":{"dbvendor":"dbvoracle","dbobjs":[{"id":"4","name":"EMP","type":"table","columns":[{"id":"5","name":"DEPTID","coordinates":[{"x":1,"y":35,"hashCode":"0"},{"x":1,"y":45,"hashCode":"0"}]},{"id":"17","name":"ENAME","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]}],"coordinates":[{"x":1,"y":19,"hashCode":"0"},{"x":1,"y":22,"hashCode":"0"}]},{"id":"9","name":"DEPT","type":"table","columns":[{"id":"10","name":"ID","coordinates":[{"x":1,"y":48,"hashCode":"0"},{"x":1,"y":55,"hashCode":"0"}]}],"coordinates":[{"x":1,"y":24,"hashCode":"0"},{"x":1,"y":28,"hashCode":"0"}]},{"id":"15","name":"PSEUDO_TABLE_INCLUDE_ORPHAN_COLUMN","type":"pseudoTable","columns":[{"id":"16","name":"ENAME","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]}],"coordinates":[{"x":1,"y":1,"hashCode":"0"},{"x":1,"y":35,"hashCode":"0"}]},{"id":"12","name":"RS-1","type":"select_list","columns":[{"id":"13","name":"ENAME","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]},{"id":"11","name":"RELATIONROWS","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}],"source":"SYSTEM"}],"coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]}],"relationships":[{"id":"1","type":"fdd","effectType":"select","target":{"id":"13","column":"ENAME","parentId":"12","parentName":"RS-1","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]},"sources":[{"id":"17","column":"ENAME","parentId":"4","parentName":"EMP","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]}]},{"id":"2","type":"fdr","effectType":"select","target":{"id":"11","column":"RELATIONROWS","parentId":"12","parentName":"RS-1","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]},"sources":[{"id":"5","column":"DEPTID","parentId":"4","parentName":"EMP","clauseType":"where","coordinates":[{"x":1,"y":35,"hashCode":"0"},{"x":1,"y":45,"hashCode":"0"}]},{"id":"10","column":"ID","parentId":"9","parentName":"DEPT","clauseType":"where","coordinates":[{"x":1,"y":48,"hashCode":"0"},{"x":1,"y":55,"hashCode":"0"}]}]}],"errors":[{"errorMessage":"find orphan column(10500) near: ename(1,8)","errorType":"SyntaxHint","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]},{"errorMessage":"Link orphan column [ename] to the first table [emp]","errorType":"LinkOrphanColumn","coordinates":[{"x":1,"y":8,"hashCode":"0"},{"x":1,"y":13,"hashCode":"0"}]}]},"graph":{"relationshipIdMap":{"e0":["1","fdd"]},"elements":{"tables":[{"columns":[{"height":16,"id":"n0::n0","label":{"content":"ename","fontFamily":"Segoe UI Symbol","fontSize":"12","height":13.96875,"width":59,"x":0,"y":0},"width":160,"x":213,"y":-30.000149}],"height":41.96875,"id":"n0","label":{"content":"RS-1","fontFamily":"Segoe UI Symbol","fontSize":"12","height":17.96875,"width":162,"x":0,"y":0},"width":162,"x":212,"y":-51.9689},{"columns":[{"height":16,"id":"n1::n0","label":{"content":"ename","fontFamily":"Segoe UI Symbol","fontSize":"12","height":13.96875,"width":59,"x":0,"y":0},"width":160,"x":1,"y":-30.000149}],"height":41.96875,"id":"n1","label":{"content":"emp","fontFamily":"Segoe UI Symbol","fontSize":"12","height":17.96875,"width":162,"x":0,"y":0},"width":162,"x":0,"y":-51.9689}],"edges":[{"id":"e0","sourceId":"n1::n0","targetId":"n0::n0"}]},"tooltip":{},"listIdMap":{"n0":["12"],"n0::n0":["13"],"n1":["4"],"n1::n0":["17"]}}},"error":"find orphan column(10500) near: ename(1,8)\r\nLink orphan column [ename] to the first table [emp]","sessionId":"1491a5d5071c220ab993aa4d8a2e0e477d83abe4dd976a0c5c56c69e886a9481_1667231780609"}
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
post
POST /api/gspLive_backend/sqlflow/generation/sqlflow/graph HTTP/1.1
Host: api.gudusoft.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 20

{
  "sqlfile": "binary"
}
{
  "code": 200,
  "data": {
    "mode": "global",
    "summary": {
      "schema": 0,
      "process": 0,
      "database": 0,
      "view": 0,
      "mostRelationTables": [
        {
          "table": "EMP"
        },
        {
          "table": "DEPT"
        }
      ],
      "column": 4,
      "relationship": 1,
      "table": 3
    },
    "sqlflow": {
      "dbvendor": "dbvoracle",
      "dbobjs": [
        {
          "id": "4",
          "name": "EMP",
          "type": "table",
          "columns": [
            {
              "id": "5",
              "name": "DEPTID",
              "coordinates": [
                {
                  "x": 1,
                  "y": 35,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 45,
                  "hashCode": "0"
                }
              ]
            },
            {
              "id": "17",
              "name": "ENAME",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ]
            }
          ],
          "coordinates": [
            {
              "x": 1,
              "y": 19,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 22,
              "hashCode": "0"
            }
          ]
        },
        {
          "id": "9",
          "name": "DEPT",
          "type": "table",
          "columns": [
            {
              "id": "10",
              "name": "ID",
              "coordinates": [
                {
                  "x": 1,
                  "y": 48,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 55,
                  "hashCode": "0"
                }
              ]
            }
          ],
          "coordinates": [
            {
              "x": 1,
              "y": 24,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 28,
              "hashCode": "0"
            }
          ]
        },
        {
          "id": "15",
          "name": "PSEUDO_TABLE_INCLUDE_ORPHAN_COLUMN",
          "type": "pseudoTable",
          "columns": [
            {
              "id": "16",
              "name": "ENAME",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ]
            }
          ],
          "coordinates": [
            {
              "x": 1,
              "y": 1,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 35,
              "hashCode": "0"
            }
          ]
        },
        {
          "id": "12",
          "name": "RS-1",
          "type": "select_list",
          "columns": [
            {
              "id": "13",
              "name": "ENAME",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ]
            },
            {
              "id": "11",
              "name": "RELATIONROWS",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ],
              "source": "SYSTEM"
            }
          ],
          "coordinates": [
            {
              "x": 1,
              "y": 8,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 13,
              "hashCode": "0"
            }
          ]
        }
      ],
      "relationships": [
        {
          "id": "1",
          "type": "fdd",
          "effectType": "select",
          "target": {
            "id": "13",
            "column": "ENAME",
            "parentId": "12",
            "parentName": "RS-1",
            "coordinates": [
              {
                "x": 1,
                "y": 8,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 13,
                "hashCode": "0"
              }
            ]
          },
          "sources": [
            {
              "id": "17",
              "column": "ENAME",
              "parentId": "4",
              "parentName": "EMP",
              "coordinates": [
                {
                  "x": 1,
                  "y": 8,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 13,
                  "hashCode": "0"
                }
              ]
            }
          ]
        },
        {
          "id": "2",
          "type": "fdr",
          "effectType": "select",
          "target": {
            "id": "11",
            "column": "RELATIONROWS",
            "parentId": "12",
            "parentName": "RS-1",
            "coordinates": [
              {
                "x": 1,
                "y": 8,
                "hashCode": "0"
              },
              {
                "x": 1,
                "y": 13,
                "hashCode": "0"
              }
            ]
          },
          "sources": [
            {
              "id": "5",
              "column": "DEPTID",
              "parentId": "4",
              "parentName": "EMP",
              "clauseType": "where",
              "coordinates": [
                {
                  "x": 1,
                  "y": 35,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 45,
                  "hashCode": "0"
                }
              ]
            },
            {
              "id": "10",
              "column": "ID",
              "parentId": "9",
              "parentName": "DEPT",
              "clauseType": "where",
              "coordinates": [
                {
                  "x": 1,
                  "y": 48,
                  "hashCode": "0"
                },
                {
                  "x": 1,
                  "y": 55,
                  "hashCode": "0"
                }
              ]
            }
          ]
        }
      ],
      "errors": [
        {
          "errorMessage": "find orphan column(10500) near: ename(1,8)",
          "errorType": "SyntaxHint",
          "coordinates": [
            {
              "x": 1,
              "y": 8,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 13,
              "hashCode": "0"
            }
          ]
        },
        {
          "errorMessage": "Link orphan column [ename] to the first table [emp]",
          "errorType": "LinkOrphanColumn",
          "coordinates": [
            {
              "x": 1,
              "y": 8,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 13,
              "hashCode": "0"
            }
          ]
        }
      ]
    },
    "graph": {
      "relationshipIdMap": {
        "e0": [
          "1",
          "fdd"
        ]
      },
      "elements": {
        "tables": [
          {
            "columns": [
              {
                "height": 16,
                "id": "n0::n0",
                "label": {
                  "content": "ename",
                  "fontFamily": "Segoe UI Symbol",
                  "fontSize": "12",
                  "height": 13.96875,
                  "width": 59,
                  "x": 0,
                  "y": 0
                },
                "width": 160,
                "x": 213,
                "y": -30.000149
              }
            ],
            "height": 41.96875,
            "id": "n0",
            "label": {
              "content": "RS-1",
              "fontFamily": "Segoe UI Symbol",
              "fontSize": "12",
              "height": 17.96875,
              "width": 162,
              "x": 0,
              "y": 0
            },
            "width": 162,
            "x": 212,
            "y": -51.9689
          },
          {
            "columns": [
              {
                "height": 16,
                "id": "n1::n0",
                "label": {
                  "content": "ename",
                  "fontFamily": "Segoe UI Symbol",
                  "fontSize": "12",
                  "height": 13.96875,
                  "width": 59,
                  "x": 0,
                  "y": 0
                },
                "width": 160,
                "x": 1,
                "y": -30.000149
              }
            ],
            "height": 41.96875,
            "id": "n1",
            "label": {
              "content": "emp",
              "fontFamily": "Segoe UI Symbol",
              "fontSize": "12",
              "height": 17.96875,
              "width": 162,
              "x": 0,
              "y": 0
            },
            "width": 162,
            "x": 0,
            "y": -51.9689
          }
        ],
        "edges": [
          {
            "id": "e0",
            "sourceId": "n1::n0",
            "targetId": "n0::n0"
          }
        ]
      },
      "tooltip": {},
      "listIdMap": {
        "n0": [
          "12"
        ],
        "n0::n0": [
          "13"
        ],
        "n1": [
          "4"
        ],
        "n1::n0": [
          "17"
        ]
      }
    }
  },
  "error": "find orphan column(10500) near: ename(1,8)\r\nLink orphan column [ename] to the first table [emp]",
  "sessionId": "1491a5d5071c220ab993aa4d8a2e0e477d83abe4dd976a0c5c56c69e886a9481_1667231780609"
}

generate sqlflow graph image

post

generate sqlflow graph image

Query parameters
columnLevelstringOptional

columnLevel

dbvendorstring · enumRequired

database vendor

Default: dbvoraclePossible values:
hideColumnbooleanOptional

whether hide column

Default: falseExample: false
ignoreFunctionbooleanOptional

ignore function

Default: falseExample: false
simpleOutputbooleanOptional

simple output, ignore the intermediate results, defualt is false.

Default: falseExample: false
ignoreRecordSetbooleanOptional

same as simpleOutput, but will keep output of the top level select list, default is false.

Default: falseExample: false
jobIdstringOptional

give the job Id if need to use the job settings and display the job graph

normalizeIdentifierbooleanOptional

whether normalize the Identifier

Default: true
showConstantTablebooleanOptional

whether show constant table

Default: false
showLinkOnlybooleanOptional

whether show link only

Default: true
showRelationTypestringOptional

show relation type, required false, default value is 'fdd', multiple values seperated by comma like fdd,frd,fdr,join. Availables are 'fdd' value of target column from source column, 'frd' the recordset count of target column which is affected by value of source column, 'fdr' value of target column which is affected by the recordset count of source column, 'join' combines rows from two or more tables, based on a related column between them

Default: fdd
showTransformbooleanOptional

whether show transform

Default: false
sqltextstringOptional

sql text from which to generate the sqlflow model

tokenstringRequired

The token is generated from userid and usersecret. It is used in every Api invocation.

treatArgumentsInCountFunctionAsDirectDataflowbooleanOptional

Whether treat the arguments in COUNT function as direct Dataflow

Default: false
userIdstringRequired

the user id of sqlflow web or client

Body
sqlfilestring · binaryOptional

sqlfile

Responses
200
OK
image/*
Responsestring · binary
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
post
POST /api/gspLive_backend/sqlflow/generation/sqlflow/graph/image HTTP/1.1
Host: api.gudusoft.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 20

{
  "sqlfile": "binary"
}
binary