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
  • SQLFlow UI
  • REST Call
  1. 8. other
  2. FAQ

Table Form Data Without Intermediates

How to output only the relationships in a table form without temporary intermediates, just column to column relationships between tables?

Let's say you have a data lineage like:

table1.column -> temp.column -> table2.column

Instead of getting the temp table in the above result, you would prefer to have directly:

table1.column -> table2.column

and if you would like to have the results under table form such as CSV, you can archive this using one of the following two approaches:

  • If you are using SQLFlow UI, change the SQLFlow UI settings and download the data lineage as CSV.

  • You can make REST api request to get the desired CSV data.

Let's consider this SQL:

INSERT INTO deptsal
            (dept_no,
             dept_name,
             salary)
SELECT d.deptno,
       d.dname,
       SUM(e.sal + Nvl(e.comm, 0)) AS sal
FROM   dept d
       left join (SELECT *
                  FROM   emp
                  WHERE  hiredate > DATE '1980-01-01') e
              ON e.deptno = d.deptno
GROUP  BY d.deptno,
          d.dname; 

SQLFlow UI

The initial status of the lineage contains temporary tables

Click the settings button and change the settings

Turn off show intermediate recordset, show function, show constant, show tranform and indirect dataflow.

You will then get your lineage without intermediates.

Right click on the main view area.

Choose Download as csv and the CSV file will be downloaded. In the CSV file you can have the above lineage under table form.

source_db,source_schema,source_table,source_column,target_db,target_schema,target_table,target_column,relation_type,effectType
"","","DEPT","DEPTNO","","","DEPTSAL","DEPT_NO","fdd","insert"
"","","DEPT","DNAME","","","DEPTSAL","DEPT_NAME","fdd","insert"
"","","EMP","COMM","","","DEPTSAL","SALARY","fdd","insert"
"","","EMP","SAL","","","DEPTSAL","SALARY","fdd","insert"

REST Call

To remove the intermediates in the result, just set false to the request params showConstantTable and showTransform and set true to the params ignoreRecordSet and ignoreFunction.

curl --location --request POST 'https://api.gudusoft.com/gspLive_backend/sqlflow/generation/sqlflow/exportLineageAsCsv?showRelationType=fdd' \
--header 'Request-Origion: SwaggerBootstrapUi' \
--header 'accept: application/json;charset=utf-8' \
--header 'Authorization;' \
--form 'dbvendor="dbvoracle"' \
--form 'userId="xx"' \
--form 'ignoreFunction="true"' \
--form 'ignoreRecordSet="true"' \
--form 'showConstantTable="false"' \
--form 'showTransform="false"' \
--form 'sqltext="INSERT INTO deptsal (dept_no, dept_name, salary) SELECT d.deptno, d.dname, SUM(e.sal + Nvl(e.comm, 0)) AS sal FROM dept d left join (SELECT * FROM emp WHERE hiredate > DATE '\''1980-01-01'\'') e ON e.deptno = d.deptno GROUP BY d.deptno, d.dname;"' \
--form 'token="xxx"'
PreviousDelete Your AccountNextNot all schema exported from Oracle

Last updated 2 years ago

endpoint is dedicated for CSV export.

If you are trying to export a Job result under CSV format, you can check

/sqlflow/exportLineageAsCsv
/sqlflow/job/exportFullLineageAsCsv