Execute File
POST
/api/v1/deployments/execute-file
const url = 'https://example.com/api/v1/deployments/execute-file?repository_name=example&branch=main&file_path=example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"additionalProperty":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/api/v1/deployments/execute-file?repository_name=example&branch=main&file_path=example' \ --header 'Content-Type: application/json' \ --data '{ "additionalProperty": "example" }'Execute a single SQL file from git repository.
This uses EXECUTE IMMEDIATE FROM to run a SQL file from a git repository branch. Supports Jinja2 template variable substitution via the USING clause.
Args: repository_name: Git repository name branch: Branch name file_path: Relative path to SQL file variables: Optional template variables for Jinja2 substitution
Returns: Dictionary with execution status
Raises: HTTPException: If execution fails
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”repository_name
required
Repository Name
Git repository name
string
Git repository name
branch
Branch
Branch name
string
Branch name
file_path
required
File Path
Relative file path in repository
string
Relative file path in repository
Header Parameters
Section titled “Header Parameters”Request Body
Section titled “Request Body”Responses
Section titled “Responses”Successful Response
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}