Upload and run a SQL script
You can import a schema through the web browser, allowing you to run your SQL script without SSH access for the cluster.
SQL upload is only available for Falcon. |
You can run a SQL script to create your database schema and relationships or joins through the browser, without having to sign in to the shell on the ThoughtSpot instance. You can edit the script and run it directly in the browser to create the schema. Note that you must have the can manage data permission and admin privileges to upload schemas. Use this feature for the following actions:
-
Create the SQL script ahead of time, and use the browser to run it.
-
Use the Write TQL interface to type your SQL directly into the browser.
-
Use the Write TQL interface as an interactive SQL editor, to make changes to an existing schema.
Run or edit an existing script
To run or edit a SQL script that you already wrote to create your database schema and relationships through the browser, follow these steps.
-
Sign in to ThoughtSpot from a browser.
-
Select Data, on the top navigation bar.
-
Select Utilities on the left navigation bar.
-
Select Upload schema.
-
Drag and drop your SQL script into the browser, or choose Browse Your Files to locate it. You cannot copy and paste an existing SQL script into the SQL editor.
-
After you upload your SQL script, you enter the SQL editor. Use it to view your script and make any changes.
-
To edit the script, select the line you would like to change, and type your changes into the interface.
-
When ready, run your script by selecting the Execute button.
-
If there are any errors, correct them and run the script again.
Write a new SQL script
To write a new SQL script to create your database schema and relationships through the browser, follow these steps.
-
Sign in to ThoughtSpot from a browser.
-
Select Data, on the top navigation bar.
-
Select Utilities on the left navigation bar.
-
Select Upload schema.
-
Select the Write TQL button in the upper-right corner of the screen.
-
After you select Write TQL, you enter the SQL editor. You can write your script for schema and relationship creation in this editor.
You cannot copy and paste an existing SQL script into the SQL editor. When you finish writing a line, select the + icon to insert a new line below.
-
When ready, run your script by selecting the Execute button.
-
If there are any errors, correct them and run the script again.