Documentation
¶
Index ¶
- type AssetDataResponseDTO
- type AssetExecuteRequestDTO
- type AssetExecuteResponseDTO
- type ConnectionConfigDTO
- type ConnectionStatusResponseDTO
- type DagExecutionResponseDTO
- type DagExecutionStatus
- type DagNodeDTO
- type DagRunRequestDTO
- type DebuggingService
- func (s *DebuggingService) Connect() error
- func (s *DebuggingService) Disconnect() error
- func (s *DebuggingService) ExecuteAssetSelect(assetName, taskId string) <-chan AssetExecuteResponseDTO
- func (s *DebuggingService) ExecuteDag(taskId string, data map[string]interface{}) <-chan DagExecutionResponseDTO
- func (s *DebuggingService) ExecuteTest(testName, taskId string) <-chan TestExecuteResponseDTO
- func (s *DebuggingService) GetAllTasks() TaskListResponseDTO
- func (s *DebuggingService) GetAssetData(taskId, assetName string, offset, limit int) AssetExecuteResponseDTO
- func (s *DebuggingService) GetConnectionStatus() ConnectionStatusResponseDTO
- func (s *DebuggingService) GetDagExecutionStatus(taskId string) DagExecutionResponseDTO
- func (s *DebuggingService) GetDagInstanceName() string
- func (s *DebuggingService) GetDagNodes() []DagNodeDTO
- func (s *DebuggingService) GetTaskStatus(taskId string) DagExecutionResponseDTO
- func (s *DebuggingService) GetTestData(testName, taskId string) TestDataResponseDTO
- func (s *DebuggingService) GetTestProfiles() []TestProfileDTO
- func (s *DebuggingService) GetTestResultsForTask(taskId string) []TestProfileDTO
- func (s *DebuggingService) MutateAsset(assetName string, taskId string, taskUUID string) <-chan AssetExecuteResponseDTO
- func (s *DebuggingService) ResetDagState() error
- type MaterializationType
- type NodeState
- type NodeStatusDTO
- type TaskListResponseDTO
- type TaskSummaryDTO
- type TestDataResponseDTO
- type TestExecuteRequestDTO
- type TestExecuteResponseDTO
- type TestProfileDTO
- type TestResultDTO
- type TestStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetDataResponseDTO ¶
type AssetDataResponseDTO struct {
AssetName string `json:"assetName"`
HasData bool `json:"hasData"`
DataType string `json:"dataType"` // "dataframe", "map", "string", etc.
IsDataFramed bool `json:"isDataFramed"`
Data interface{} `json:"data,omitempty"`
RowCount int `json:"rowCount,omitempty"` // For dataframes
ColumnCount int `json:"columnCount,omitempty"` // For dataframes
Columns []string `json:"columns,omitempty"` // For dataframes
Error string `json:"error,omitempty"`
}
type AssetExecuteRequestDTO ¶
type AssetExecuteResponseDTO ¶
type AssetExecuteResponseDTO struct {
TaskId string `json:"taskId"`
AssetName string `json:"assetName"`
Status NodeState `json:"status"`
StartTime *int64 `json:"startTime,omitempty"`
EndTime *int64 `json:"endTime,omitempty"`
ExecutionTimeMs int64 `json:"executionTimeMs,omitempty"`
Result interface{} `json:"result,omitempty"`
Error string `json:"error,omitempty"`
UpstreamsUsed []string `json:"upstreamsUsed"`
TotalRecords int `json:"totalRecords,omitempty"`
}
type ConnectionConfigDTO ¶
type ConnectionConfigDTO struct {
Name string `json:"name"`
Type string `json:"type"`
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
Database string `json:"database,omitempty"`
User string `json:"user,omitempty"`
Path string `json:"path,omitempty"`
Extensions []string `json:"extensions,omitempty"`
}
ConnectionConfigDTO represents configuration details for a database connection
type ConnectionStatusResponseDTO ¶
type ConnectionStatusResponseDTO struct {
IsConnected bool `json:"isConnected"`
Connections []ConnectionConfigDTO `json:"connections"`
}
ConnectionStatusResponseDTO represents the overall connection status
type DagExecutionResponseDTO ¶
type DagExecutionResponseDTO struct {
TaskId string `json:"taskId"`
TaskUUID string `json:"taskUuid,omitempty"`
Status DagExecutionStatus `json:"status"`
NodesStatus []NodeStatusDTO `json:"nodes"`
LastTaskName string `json:"lastTaskName"`
CompletedAssets int `json:"completedAssets"`
TotalAssets int `json:"totalAssets"`
FailedAssets int `json:"failedAssets"`
InProgressAssets int `json:"inProgressAssets"`
RootTestResults []TestResultDTO `json:"rootTestResults,omitempty"`
}
type DagExecutionStatus ¶
type DagExecutionStatus string
const ( DagExecutionStatusNotStarted DagExecutionStatus = "NOT_STARTED" DagExecutionStatusInProgress DagExecutionStatus = "IN_PROGRESS" DagExecutionStatusSuccess DagExecutionStatus = "SUCCESS" DagExecutionStatusFailed DagExecutionStatus = "FAILED" DagExecutionStatusPending DagExecutionStatus = "PENDING" DagExecutionStatusTestsFailed DagExecutionStatus = "TESTS_FAILED" // All assets succeeded but some tests failed )
type DagNodeDTO ¶
type DagNodeDTO struct {
Name string `json:"name"`
Description string `json:"description"`
Downstreams []string `json:"downstreams"`
Upstreams []string `json:"upstreams"`
SQLSelectQuery string `json:"sqlSelectQuery"`
SQLCompiledQuery string `json:"sqlCompiledQuery"`
Materialization MaterializationType `json:"materialization"`
ConnectionType string `json:"connectionType"`
ConnectionName string `json:"connectionName"`
IsDataFramed bool `json:"isDataFramed"`
PersistInputs bool `json:"persistInputs"`
Tests []string `json:"tests"`
State NodeState `json:"state"`
TotalTests int `json:"totalTests"`
SuccessfulTests int `json:"successfulTests"`
LastExecutionDuration int64 `json:"lastExecutionDuration"` // Duration in milliseconds
LastTestsDuration int64 `json:"lastTestsDuration"` // Duration of tests execution in milliseconds
TaskGroupIndex int `json:"TaskGroupIndex"`
}
type DagRunRequestDTO ¶
type DebuggingService ¶
type DebuggingService struct {
// contains filtered or unexported fields
}
func NewDebuggingService ¶
func NewDebuggingService(dag *dags.DebugDag) *DebuggingService
func (*DebuggingService) Connect ¶
func (s *DebuggingService) Connect() error
Connect establishes connections to all databases
func (*DebuggingService) Disconnect ¶
func (s *DebuggingService) Disconnect() error
Disconnect closes all database connections
func (*DebuggingService) ExecuteAssetSelect ¶
func (s *DebuggingService) ExecuteAssetSelect(assetName, taskId string) <-chan AssetExecuteResponseDTO
ExecuteAssetSelect executes the asset's SQL query using ToDataFrame and saves the result to the DAG node The SQL template is rendered first, executing all template functions (like Ref) Returns a response with taskId that can be used to retrieve the data via GetAssetData endpoint
func (*DebuggingService) ExecuteDag ¶
func (s *DebuggingService) ExecuteDag(taskId string, data map[string]interface{}) <-chan DagExecutionResponseDTO
func (*DebuggingService) ExecuteTest ¶
func (s *DebuggingService) ExecuteTest(testName, taskId string) <-chan TestExecuteResponseDTO
ExecuteTest executes a single test query and stores the result Test succeeds (status: SUCCESS) if query returns ZERO rows Test fails (status: FAILED) if query returns ONE OR MORE rows
func (*DebuggingService) GetAllTasks ¶
func (s *DebuggingService) GetAllTasks() TaskListResponseDTO
func (*DebuggingService) GetAssetData ¶
func (s *DebuggingService) GetAssetData(taskId, assetName string, offset, limit int) AssetExecuteResponseDTO
GetAssetData retrieves asset execution data for a specific task
func (*DebuggingService) GetConnectionStatus ¶
func (s *DebuggingService) GetConnectionStatus() ConnectionStatusResponseDTO
GetConnectionStatus returns the connection status with configuration details for each connection
func (*DebuggingService) GetDagExecutionStatus ¶
func (s *DebuggingService) GetDagExecutionStatus(taskId string) DagExecutionResponseDTO
func (*DebuggingService) GetDagInstanceName ¶
func (s *DebuggingService) GetDagInstanceName() string
func (*DebuggingService) GetDagNodes ¶
func (s *DebuggingService) GetDagNodes() []DagNodeDTO
func (*DebuggingService) GetTaskStatus ¶
func (s *DebuggingService) GetTaskStatus(taskId string) DagExecutionResponseDTO
func (*DebuggingService) GetTestData ¶
func (s *DebuggingService) GetTestData(testName, taskId string) TestDataResponseDTO
GetTestData retrieves test execution data for a specific task
func (*DebuggingService) GetTestProfiles ¶
func (s *DebuggingService) GetTestProfiles() []TestProfileDTO
func (*DebuggingService) GetTestResultsForTask ¶
func (s *DebuggingService) GetTestResultsForTask(taskId string) []TestProfileDTO
func (*DebuggingService) MutateAsset ¶
func (s *DebuggingService) MutateAsset(assetName string, taskId string, taskUUID string) <-chan AssetExecuteResponseDTO
func (*DebuggingService) ResetDagState ¶
func (s *DebuggingService) ResetDagState() error
type MaterializationType ¶
type MaterializationType string
const ( MaterializationTable MaterializationType = "table" MaterializationIncremental MaterializationType = "incremental" MaterializationView MaterializationType = "view" MaterializationCustom MaterializationType = "custom" MaterializationRaw MaterializationType = "raw" )
type NodeStatusDTO ¶
type NodeStatusDTO struct {
Name string `json:"name"`
State NodeState `json:"state"`
Order int `json:"order"`
StartTime *int64 `json:"startTime,omitempty"` // Unix timestamp in milliseconds
EndTime *int64 `json:"endTime,omitempty"` // Unix timestamp in milliseconds
ExecutionTimeMs int64 `json:"executionTimeMs,omitempty"`
Message string `json:"message,omitempty"`
TotalTests int `json:"totalTests"`
PassedTests int `json:"passedTests"`
FailedTests int `json:"failedTests"`
TestResults []TestResultDTO `json:"testResults,omitempty"`
}
type TaskListResponseDTO ¶
type TaskListResponseDTO struct {
Tasks []TaskSummaryDTO `json:"tasks"`
Total int `json:"total"`
}
type TaskSummaryDTO ¶
type TaskSummaryDTO struct {
TaskId string `json:"taskId"`
TaskUUID string `json:"taskUuid,omitempty"`
Status DagExecutionStatus `json:"status"`
StartTime *int64 `json:"startTime,omitempty"`
EndTime *int64 `json:"endTime,omitempty"`
TotalAssets int `json:"totalAssets"`
CompletedAssets int `json:"completedAssets"`
FailedAssets int `json:"failedAssets"`
InProgressAssets int `json:"inProgressAssets"`
}
TaskSummaryDTO represents the summary of an entire task execution (identified by TaskId) It contains aggregate counts for all assets in the DAG execution
type TestDataResponseDTO ¶
type TestDataResponseDTO struct {
TestName string `json:"testName"`
Description string `json:"description,omitempty"`
TaskId string `json:"taskId"`
Status string `json:"status"`
RowCount int `json:"rowCount"`
Data []map[string]interface{} `json:"data"` // Always present (empty array or populated)
ExecutedAt string `json:"executedAt"` // ISO 8601 timestamp
}
TestDataResponseDTO represents the data from a test execution
type TestExecuteRequestDTO ¶
type TestExecuteRequestDTO struct {
TaskId string `json:"taskId"`
}
TestExecuteRequestDTO represents a request to execute a test
type TestExecuteResponseDTO ¶
type TestExecuteResponseDTO struct {
TestName string `json:"testName"`
Description string `json:"description,omitempty"`
TaskId string `json:"taskId"`
Status string `json:"status"` // "SUCCESS" or "FAILED"
RowCount int `json:"rowCount"`
ErrorMsg string `json:"errorMsg,omitempty"`
DurationMs int64 `json:"durationMs"`
ExecutedAt string `json:"executedAt"` // ISO 8601 timestamp
}
TestExecuteResponseDTO represents the result of a test execution
type TestProfileDTO ¶
type TestResultDTO ¶
type TestResultDTO struct {
TestName string `json:"testName"`
Status string `json:"status"` // SUCCESS, FAILED, NOT_FOUND
ErrorMsg string `json:"error,omitempty"`
DurationMs int64 `json:"durationMs"`
}
TestResultDTO represents a test result in API responses
type TestStatus ¶
type TestStatus string
const ( TestStatusInitial TestStatus = "INITIAL" TestStatusInProgress TestStatus = "IN_PROGRESS" TestStatusFailed TestStatus = "FAILED" TestStatusSuccess TestStatus = "SUCCESS" )