MacOS¶
Please check the following page for the old SQLFlow installation:
Older Version SQLFlow Under macOS
Click here to view the Older Version SQLFlow Under macOS documentation
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¶
- SQLFlow on-premise version
- Java 17
- Port needs to be opened. (The default port is 8165 but you can customized this port)
- At least 8GB memory
Setup Environment¶
1 2 3 |
|
Upload Files¶
create a directory :
1 2 |
|
upload your backend and frontend file to sqlflow
folder, like this :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
Set scripts permissions¶
1 |
|
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 Backend Services¶
You can assign the RAM to SQLFlow by specifying the boot parameter when starting the service.
1 |
|
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.
start service in background:
1 |
|
please allow 1-2 minutes to start the service.
use jps
to check those 3 processing are running.
1 2 3 |
|
Java service port
File | Port |
---|---|
eureka.jar | 8761 |
gspLive.jar | 8165 |
sqlservice.jar | 8083 |
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¶
- Web port is
8165
- 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):
1 |
|

Open SQLFlow¶
open http://yourdomain.com/ to see the SQLFlow.
open http://yourdomain.com:8165/doc.html?lang=en
or http://localhost:8165/api/gspLive_backend/doc.html?lang=en
to see the Restful API document.

To login, please check the following default user credentials:
Cloud and On-Premise Version
Click here to view the Cloud and On-Premise Version documentation
Gudu SQLFlow License file¶
If this is the first time you setup the Gudu SQLFlow on a new machine, then, you will see this license UI:

- You send us the Gudu SQLFlow Id (6 characters in red).
- We will generate license file for you based on this id.
- You upload the license file by click the "upload license file" link.
Users can apply for three official license files after purchasing the On-Prem SQLFlow, each designated for production, development, and testing environments.
SQLFlow client api call¶
- Get userId from the account profile page and generate the secrete key

- Generate token by invoking the token generate API
1 2 |
|
-
Test webapi by curl
- test sql:
1
select name from user
- curl command:
1 2 3 4 5 6
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:
1 2 3 4 5 6 7 8 9 10 11 12 13
{ "code": 200, "data": { "dbvendor": "dbvoracle", "dbobjs": [ ... ], "relations": [ ... ] }, "sessionId": ... }
- If the code returns 401, please check the userId is set or the userId is valid.
Enable HTTPS¶
To use HTTPS with your domain name, you need a SSL or TLS certificate installed. You can directly buy a certificate from CA. If you don't need a recognized certificate, you can generate one by yourselves.
To generate the certificate files, you can use the following commands:
1 2 3 4 |
|
You will have sqlflow_keystore.p12 and sqlflow-pkcs8.key generated with the above commands.
Copy sqlflow_keystore.p12 and sqlflow-pkcs8.key to /wings/sqlflow/backend/conf
and add following configs in /wings/sqlflow/backend/bin/gspLive.sh
:
1 |
|

Restart the SQLFlow and https is now enabled.
