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/selectedgraph/table_level_lineage

Previous/sqlflowNext/sqlflow/selectedgraph/image

Last updated 1 year ago

Sample response:

{
  "code": 200,
  "data": {
    "mode": "global",
    "summary": {
      "schema": 0,
      "process": 1,
      "database": 0,
      "view": 0,
      "mostRelationTables": [
        {
          "table": "TBL_TEMP1"
        },
        {
          "table": "TBL_TEMP2"
        }
      ],
      "column": 0,
      "relationship": 2,
      "table": 2
    },
    "sqlflow": {
      "dbvendor": "dbvoracle",
      "dbobjs": [
        {
          "id": "6",
          "name": "QUERY INSERT-1",
          "type": "process",
          "coordinates": [
            {
              "x": 1,
              "y": 1,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 112,
              "hashCode": "0"
            }
          ],
          "queryHashId": "4cc55e0b4d63c3e07927d59f117c8851"
        },
        {
          "id": "4",
          "name": "TBL_TEMP2",
          "type": "table",
          "columns": [],
          "coordinates": [
            {
              "x": 1,
              "y": 13,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 22,
              "hashCode": "0"
            }
          ]
        },
        {
          "id": "10",
          "name": "TBL_TEMP1",
          "type": "table",
          "columns": [],
          "coordinates": [
            {
              "x": 1,
              "y": 67,
              "hashCode": "0"
            },
            {
              "x": 1,
              "y": 76,
              "hashCode": "0"
            }
          ]
        }
      ],
      "relationships": [
        {
          "id": "504",
          "type": "fdd",
          "target": {
            "id": "6",
            "coordinates": []
          },
          "sources": [
            {
              "id": "10",
              "sourceId": "10",
              "sourceName": "TBL_TEMP1",
              "coordinates": []
            }
          ]
        },
        {
          "id": "506",
          "type": "fdd",
          "target": {
            "id": "4",
            "coordinates": []
          },
          "sources": [
            {
              "id": "6",
              "sourceId": "6",
              "sourceName": "QUERY INSERT-1",
              "coordinates": []
            }
          ]
        }
      ]
    },
    "graph": {
      "relationshipIdMap": {
        "e0": [
          "506",
          "fdd"
        ],
        "e1": [
          "504",
          "fdd"
        ]
      },
      "elements": {
        "tables": [
          {
            "columns": [],
            "height": 25.96875,
            "id": "n0",
            "label": {
              "content": "Query Insert-1",
              "fontFamily": "Segoe UI Symbol",
              "fontSize": "12",
              "height": 17.96875,
              "width": 162,
              "x": 0,
              "y": 0
            },
            "width": 162,
            "x": 212,
            "y": -35.9689
          },
          {
            "columns": [],
            "height": 25.96875,
            "id": "n1",
            "label": {
              "content": "tbl_temp2",
              "fontFamily": "Segoe UI Symbol",
              "fontSize": "12",
              "height": 17.96875,
              "width": 162,
              "x": 0,
              "y": 0
            },
            "width": 162,
            "x": 424,
            "y": -35.9689
          },
          {
            "columns": [],
            "height": 25.96875,
            "id": "n2",
            "label": {
              "content": "tbl_temp1",
              "fontFamily": "Segoe UI Symbol",
              "fontSize": "12",
              "height": 17.96875,
              "width": 162,
              "x": 0,
              "y": 0
            },
            "width": 162,
            "x": 0,
            "y": -35.9689
          }
        ],
        "edges": [
          {
            "id": "e0",
            "sourceId": "n0",
            "targetId": "n1"
          },
          {
            "id": "e1",
            "sourceId": "n2",
            "targetId": "n0"
          }
        ]
      },
      "tooltip": {},
      "listIdMap": {
        "n0": [
          "6"
        ],
        "n1": [
          "4"
        ],
        "n2": [
          "10"
        ]
      }
    }
  },
  "sessionId": "98f82119a46175bb8e4ed971133f2953ea66556107e438030df2a3217bb67baa_1666495937504"
}

generate selected table level lineage graph

post

generate selected table level lineage graph

Query parameters
columnstringOptional

column

tablestringOptional

table

schemastringOptional

schema

databasestringOptional

database

dbvendorstring ยท enumRequired

database vendor

Default: dbvoraclePossible values:
ignoreSelfLineagebooleanOptional

whether ignore self lineage

Default: true
jobIdstringOptional

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

normalizeIdentifierbooleanOptional

whether normalize the identifier

Default: true
sessionIdstringRequired

session Id

tokenstringRequired

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

userIdstringRequired

the user id of sqlflow web or client

Responses
200
OK
application/json;charset=utf-8
ResponsestringExample: {"code":200,"data":{"mode":"global","summary":{"schema":0,"process":0,"database":0,"view":0,"mostRelationTables":[],"column":4,"relationship":0,"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"}]}],"relationships":[],"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":{},"elements":{"tables":[],"edges":[]},"tooltip":{},"listIdMap":{}}},"sessionId":"1491a5d5071c220ab993aa4d8a2e0e477d83abe4dd976a0c5c56c69e886a9481_1667481872808"}
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
post
POST /api/gspLive_backend/sqlflow/generation/sqlflow/selectedgraph/table_level_lineage HTTP/1.1
Host: api.gudusoft.com
Accept: */*
{
  "code": 200,
  "data": {
    "mode": "global",
    "summary": {
      "schema": 0,
      "process": 0,
      "database": 0,
      "view": 0,
      "mostRelationTables": [],
      "column": 4,
      "relationship": 0,
      "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"
            }
          ]
        }
      ],
      "relationships": [],
      "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": {},
      "elements": {
        "tables": [],
        "edges": []
      },
      "tooltip": {},
      "listIdMap": {}
    }
  },
  "sessionId": "1491a5d5071c220ab993aa4d8a2e0e477d83abe4dd976a0c5c56c69e886a9481_1667481872808"
}