Documentation
¶
Index ¶
- func CoordinateWorkAndUpdateStatus(ctx context.Context, dbpool *pgxpool.Pool, ca *CommandArguments) error
- func GetOutputRecordCount(dbpool *pgxpool.Pool, sessionId string) (int64, int64)
- func RegisterReport(dbpool *pgxpool.Pool, client, org, objectType, fileKey string, ...) error
- type CommandArguments
- func (ca *CommandArguments) DoCsvReport(dbpool *pgxpool.Pool, tempDir string, s3FileName *string, name string, ...) error
- func (ca *CommandArguments) DoParquetReport(dbpool *pgxpool.Pool, tempDir string, s3FileName *string, name string, ...) error
- func (ca *CommandArguments) DoReport(dbpool *pgxpool.Pool, tempDir string, outputFileName *string, sqlStmt *string) (string, error)
- func (ca *CommandArguments) RunReports(dbpool *pgxpool.Pool) (returnedErr error)
- func (ca *CommandArguments) RunSchemaProviderReportsCmds(ctx context.Context, dbpool *pgxpool.Pool, errCh chan<- error)
- type CommandWorker
- type RegisterReportSpec
- type ReportDirectives
- type ReportProperty
- type RunWhenCriteria
- type SentinelConfig
- type StatementProperty
- type StringSubstitution
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOutputRecordCount ¶
Returns dbRecordCount (nbr of rows in pipeline_execution_details) and outputRecordCount (nbr of rows saved from server process)
Types ¶
type CommandArguments ¶
type CommandArguments struct { WorkspaceName string Client string Org string ObjectType string Environment string SessionId string SourcePeriodKey string ProcessName string ReportName string FileKey string OutputPath string OriginalFileName string ReportScriptPaths []string CurrentReportDirectives *ReportDirectives BucketName string RegionName string SkipCompileWorkspace bool FileKeyComponents map[string]interface{} }
func (*CommandArguments) DoCsvReport ¶
func (*CommandArguments) DoParquetReport ¶
func (*CommandArguments) DoReport ¶
func (ca *CommandArguments) DoReport(dbpool *pgxpool.Pool, tempDir string, outputFileName *string, sqlStmt *string) (string, error)
The heavy lifting outputFileName is the name in the report sql file, this is mapped to a table name in ReportDirectives.ReportsAsTable
func (*CommandArguments) RunReports ¶
func (ca *CommandArguments) RunReports(dbpool *pgxpool.Pool) (returnedErr error)
Main Functions --------------------------------------------------------------------------------------
func (*CommandArguments) RunSchemaProviderReportsCmds ¶
func (ca *CommandArguments) RunSchemaProviderReportsCmds(ctx context.Context, dbpool *pgxpool.Pool, errCh chan<- error)
Run report commands specified by the schema provider of the main input source Note the errCh will be closed by this func either synchronously or async when the worker pool completes
type CommandWorker ¶
type CommandWorker struct {
// contains filtered or unexported fields
}
func NewCommandWorker ¶
func (*CommandWorker) DoWork ¶
func (ctx *CommandWorker) DoWork(workersTaskCh <-chan any)
type RegisterReportSpec ¶
type ReportDirectives ¶
type ReportDirectives struct { // InputPath is original fileKey, unless overriten in config file, used to emit sentinel file FilePathSubstitution []StringSubstitution `json:"filePathSubstitution"` ReportScripts []string `json:"reportScripts"` UpdateLookupTables bool `json:"updateLookupTables"` EmitSentinelFile *SentinelConfig `json:"emitSentinelFile"` OutputS3Prefix string `json:"outputS3Prefix"` InputPath string `json:"inputPath"` OutputPath string `json:"outputPath"` ReportProperties map[string]ReportProperty `json:"reportProperties"` StatementProperties map[string]StatementProperty `json:"statementProperties"` RegisterReports []RegisterReportSpec `json:"registerReport"` }
type ReportProperty ¶
type ReportProperty struct { ReportOrScript string `json:"reportOrScript"` UpdatedFileKeys []string `json:"updatedFileKeys"` RunWhen []RunWhenCriteria `json:"runWhen"` }
type RunWhenCriteria ¶
type SentinelConfig ¶
type SentinelConfig struct {
FilePathSubstitution []StringSubstitution `json:"filePathSubstitution"`
}
type StatementProperty ¶
type StatementProperty struct { Org string `json:"org"` ObjectType string `json:"object_type"` OutputFormat string `json:"outputFormat"` RunWhen []RunWhenCriteria `json:"runWhen"` }
type StringSubstitution ¶
Click to show internal directories.
Click to hide internal directories.