/
ValidateDefiningSQL API
ValidateDefiningSQL API
The ValidateDefiningSQL API is an endpoint used to validate definingSQL in Synapse, such as for the MaterializedView or VirtualTable definingSQL fields. Note: in order to validate definingSQL, the specific definingSQLEntityType must be known.
ValidateDefiningSQL Request Body
{
"title": "DefiningSQLValidationObject",
"description": "The request body for validateDefiningSql",
"properties": {
"definingSQL": {
"type": "string",
"description": "The synapse SQL statement that defines the data in the table."
},
"entityType": {
"$ref": "org.sagebionetworks.repo.model.table.DefiningSqlEntityType",
"description": "Which type of entity is this definingSQL for."
}
}
}
ValidateDefiningSQL Response Body
{
"title": "DefiningSqlValidationResponse",
"description": "The response body from validateDefiningSql",
"properties": {
"isValid": {
"type": "boolean",
"description": "True if the provided SQL is valid, false otherwise."
},
"invalidReason": {
"type": "string",
"description": "If the definingSQL is invalid, this will contain a string describing why it is invalid. Otherwise, this will be null."
}
}
}
DefiningSqlEntityType.json
{
"description": "Type of the entity containing definingSQL",
"type": "string",
"enum": [
{
"name": "materializedview",
"description": "A materialized view is a view whose content is defined by a Synapse SQL query and it is persisted as a synapse table."
},
{
"name": "virtualtable",
"description": "A virtual table is represents the results of Synapse SQL query. The results are not persisted and the query is run each time the virtual table is queried."
}
]
}
HTTP Types
URL | HTTP Method | Description | Request Object | Response |
---|---|---|---|---|
/validateDefiningSql | POST | Validate the definingSQL that is included in the request body. | DefiningSQLValidationObject | DefiningSQLValidationResponse |
, multiple selections available,
Related content
Synapse Joins
Synapse Joins
Read with this
Table Entities
Table Entities
More like this
JSON Schemas
JSON Schemas
More like this
Synapse Table Data Change Request Process
Synapse Table Data Change Request Process
More like this