| cloudos.sql_validate | R Documentation |
Validates SQL syntax and references before execution.
cloudos.sql_validate(profilename = "", sql = "")
profilename |
Character. Name of the configured profile to use. If empty or NULL, uses the default profile. |
sql |
Character. SQL query to validate. |
List with validation results including isValid, tableReferences, and columnReferences.
## Not run:
# Validate a SQL query
validation <- cloudos.sql_validate(
profilename = "production",
sql = "SELECT person_id FROM person WHERE year_of_birth >= 1960"
)
if (validation$isValid) {
cat("SQL is valid\n")
cat("Tables:", paste(validation$tableReferences, collapse = ", "), "\n")
} else {
cat("SQL is invalid:", validation$message, "\n")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.