View Entity Syntax
The page shows you how to use the SHOW CREATE command to view the syntax used to create an entity within Upsolver.
To view the syntax used to create an entity within Upsolver, run the SHOW CREATE
command for a table, job, materialized view, or cluster. This command returns the full syntax that was executed in Upsolver, including default options appended by the query engine.
You can run the command for entities that you have written and created, as well as entities created by Upsolver:
After running the command, the results return the full syntax and you can copy and paste the code into your query window and re-use this code or adapt it as required. The results enable you to see the full settings applied to an entity when it was created.
If you have spaces in your entity names, ensure you enclose the name using double quotation marks.
Examples
SHOW CREATE TABLE
The following example runs the SHOW CREATE
command for the sample table orders_raw_data, which is used to stage ingested data in the data lake:
The results include all the details about the options used to create the table:
Using this command you can quickly discover the table's computer cluster and storage information, as well as the columns used to partition the table.
SHOW CREATE JOB
The SHOW CREATE
command can be run for any job within Upsolver. Being able to run this command from a query window means you don't need to drill into the job details to see the underlying script used to create it. Furthermore, you can run this for ingestion and transformation jobs, a job that generates sub-jobs, and a sub-job.
The following example displays the creation syntax for the load_raw_orders_to_staging job:
This returns the following results:
SHOW CREATE MATERIALIZED VIEW
A materialized view is a type of job based on aggregated data. The view cannot be queried directly, only from within another job, so it's helpful to be able to display information about the SQL used to create it:
This returns the results as below:
SHOW CREATE CLUSTER
The example below returns all the information about the Default Compute (Free) cluster:
This command returns the following results for the default cluster:
Last updated