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. 1. Introduction
  2. Installation

Windows

PreviousMacOSNextDocker

Last updated 4 months ago

Please check the following page for the old SQLFlow installation:

If you have SQLFlow 5.x installed on your server and would like to upgrade to SQLFlow 6.x, please refer to this page:

Starting from SQLFlow 6.0, we have integrated web packages into the backend service, no Frontend installation and nginx configuration is required!

Prerequisites

  • Server with at least 8GB memory

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

Unzip SQLFlow file

  • create a folder: c:\wings\sqlflow

  • unzip SQLFlow install package to c:\wings\sqlflow, you will get c:\wings\sqlflow\backend

Customize the port

If you don't want to change the default service port you can just ignore this section. Otherwise this section will show you how to customize the port.

1. Default port

  1. Web port is 8165

  2. SQLFlow backend service port:

File
Port

eureka.jar

8761

gspLive.jar

8165

sqlservice.jar

8083

2. Change the default port in gspLive.sh(gspLive.bat)

You can change the web or backend api port from 8165 to any available port.

Add the following section in gspLive.sh(or gspLive.bat in Windows):

--server.port=<customized_port>

Backend Services Configuration

sqlflow provides several options to control the service analysis logic. Open the sqlservice configuration file(conf/gudu_sqlflow.conf)

  • user_token_expire_hours: default value is 24. User can customize the TTL of the token by setting this field. In case user_token_expire_hours less than or equals to 0, the user token would never expire.

  • ignore_user_token: default value is false, token auth is skipped in case the value is set to true. When the ignore_user_token option is turned on, users are no longer required to login and account icon will disappear. As a result, the system does not enforce team management since any user can access it without authentication.

  • relation_limit: default value is 1000. When the count of selected object relations is greater than relation_limit, sqlflow will fallback to the simple mode, ignore all the record sets. If the relations of simple mode are still greater than relation_limit, sqlflow will only show the summary information.

  • big_sql_size: default value is 4096. If the sql length is greater than big_sql_size, sqlflow submit the sql in the work queue and execute it. If the work queue is full, sqlflow throws an exception and returns error message "Sorry, the service is busy. Please try again later."

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.

You can assign the RAM to SQLFlow by specifying the boot parameter when starting the service.

 backend.bat /m <RAM_VALUE>

The RAM_VALUE could be: 4g 8g 16g 32g or 64g.

SQLFlow will automatically allocate the memory based on the status of the installed server if this parameter is not given. SQLFlow would allocate less than 31 GB memory if that is the case. However, if your total memory is less than 32 GB, SQLFlow would allocate all the remaining memory on your server.

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.

To login, please check the following default user credentials:

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

  • Get userId from the account profile page and generate the secrete key

  • Generate token by invoking the token generate API

curl --location --request POST 'http://localhost:8165/api/gspLive_backend/user/generateToken?userId=%3CUSER_ID%3E&secretKey=%3CSECRET_KEY%3E' \
--header 'Accept: application/json;charset=utf-8'
  • Test webapi by curl

    • test sql:

      select name from user
    • curl command:

    curl --location 'http://localhost:8165/api/gspLive_backend/sqlflow/generation/sqlflow' \
    --header 'accept: application/json;charset=utf-8' \
    --form 'userId="<USER ID>"' \
    --form 'dbvendor="dbvoracle"' \
    --form 'sqltext="select name from user"' \
    --form 'token="<TOKEN>"'
    • 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.

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

Open http://yourIp/api/gspLive_backend/doc.html?lang=en to see the Restful API document. (Will need to turn on the doc, check .)

See

Cloud and On-Premise version
sqlflow client api call
For older version SQLFlow under Windows
Upgrade
SQLFlow on-premise version
this page

generate token

post

generate user token for restful api

Query parameters
userIdstringRequired

the user id of sqlflow web or client

secretKeystringRequired

the secretKey of the user

Responses
200
OK
application/json;charset=utf-8
Responsestring
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
post
POST /api/gspLive_backend/user/generateToken HTTP/1.1
Host: api.gudusoft.com
Accept: */*
text
  • Prerequisites
  • Unzip SQLFlow file
  • Customize the port
  • Backend Services Configuration
  • Start SQLFlow backend
  • SQLFlow is ready
  • Stop the SQLFlow
  • SQLFlow client api call
  • POSTgenerate token
  • troubleshooting