Skip to end of banner
Go to start of banner

ValidateDefiningSQL API

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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."
		}, 
		"definingSQLEntityType": {
			"$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": "A boolean representing whether or not the provided definingSQL is valid for the given entity type."
		}
    }
}

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

  • No labels