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
  • This page is for SQLFlow 5.x.x.x
  • Prerequisites
  • Unzip SQLFlow file
  • Start SQLFlow backend
  • Nginx Reverse Proxy
  • start Nginx
  • SQLFlow is ready
  • Stop the SQLFlow
  • Sqlflow client api call
  • troubleshooting
  1. 1. Introduction
  2. Installation
  3. Version and Users
  4. SQLFlow before Version 6

For older version SQLFlow under Windows

PreviousFor older version SQLFlow under MacOSNextLinux

Last updated 1 year ago

This page is for SQLFlow 5.x.x.x

Please refer to the latest install manual if you are using the latest SQFlow(version > 6.0.0.0):

You can check this page for the SQLFlow berfore version


Prerequisites

  • Server with at least 8GB memory

  • install JDK1.8 SET JAVA_HOME variable, and then add %JAVA_HOME%\bin to the path variable

  • install Nginx for windows Download the Nginx Windows version here: http://nginx.org/en/docs/windows.html

Unzip SQLFlow file

  • create a folder: c:\wings\sqlflow

  • unzip SQLFlow install package to c:\wings\sqlflow, you will get 2 directories like:

    1. c:\wings\sqlflow\backend

    2. c:\wings\sqlflow\frontend

Start SQLFlow backend

  • Open a dos command windows

  • cd c:\wings\sqlflow\backend\bin

  • run backend.bat

  • please wait 3-5 minutes to allow the SQLFlow service to start completely.

Nginx Reverse Proxy

If we set the reverse proxy path of gspLive restful service to /api

1. config Nginx

  • enter conf directory where Nginx is installed such as Nginx-1.19.4\conf

  • modify the Nginx.conf, replace the server section in nginx.conf with the following code:

	server {

		listen 80 default_server;

		listen [::]:80 default_server;

		root C:\wings\sqlflow\frontend;

		index index.html;
		
		location ~* ^/index.html {
			add_header X-Frame-Options deny;
			add_header Cache-Control no-store;
		}

		location / {
			try_files $uri $uri/ =404;
		}
	
		location /api/ {
			proxy_pass http://127.0.0.1:8081/;
			proxy_connect_timeout 600s ;
			proxy_read_timeout 600s;
			proxy_send_timeout 600s;
		
			proxy_set_header Host $host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header User-Agent $http_user_agent;  
		}
	}
	

Please make sure C:\wings\sqlflow\frontend is where the SQLFlow frontend is installed, otherwise, please change C:\wings\sqlflow\frontend to the path where the SQLFlow frontend is located.

2. modify frontend configuration file config.private.json

  • Open the configration file "C:\wings\sqlflow\frontend\config.private.json"

  • Modify the ApiPrefix attribute

  "ApiPrefix": "/api"

start Nginx

  • Open a dos command window

  • cd the directory where Nginx is installed

  • run just nginx.exe

SQLFlow is ready

Open the browser and go to localhost or got to the IP where the SQLFlow is installed.

  • Open http://yourIp/ to see the SQLFlow.

  • Open http://yourIp/api/gspLive_backend/doc.html?lang=en to see the Restful API documention.

Stop the SQLFlow

  • close the window where the backend.bat is running.

  • cd c:\wings\sqlflow\backend\bin

  • run stop.bat

Sqlflow client api call

  1. Get userId from gudu_sqlflow.conf

  • Open the configration file "c:\wings\sqlflow\backend\conf\gudu_sqlflow.conf"

  • The value of anonymous_user_id field is webapi userId

  anonymous_user_id=xxx
  • Note: on-promise mode, webapi call doesn't need the token parameter

  1. Test webapi by curl

    • test sql:

      select name from user
    • curl command:

      curl -X POST "http://yourIp/api/gspLive_backend/sqlflow/generation/sqlflow" -H "accept:application/json;charset=utf-8" -F "userId=YOUR USER ID HERE" -F  "dbvendor=dbvoracle" -F "sqltext=select name from user"
    • response:

      {
        "code": 200,
        "data": {
          "dbvendor": "dbvoracle",
          "dbobjs": [
            ...
          ],
          "relations": [
            ...
          ]
        },
        "sessionId": ...
      }
    • If the code returns 401, please check the userId is set or the userId is valid.

troubleshooting

Hostname error

Make sure the window hostname doesn't include the underscore symbol (_), otherwise, the service will not work properly. please change it to minus symbol (-)

Cannot start

If you have following errors when starting backend.bat

'jps' is not recognized as an internal or external command

Please check the first section of this page, confirm that your JDK environement variable is successfully set. You may need to restart your server to enable the change.

Error uploading large file

This is due to nginx config. Nginx by default limit the size of the files uploaded. Add the following config in your http block of the Nginx config file to change the file upload size in Nginx

client_max_body_size 200m;

This increases the limit to 200M, if needed you may change this number.

See

sqlflow client api call
Windows
SQLFlow before Version 6
SQLFlow on-premise version