JobApp

etlflow.JobApp
trait JobApp extends ZIOAppDefault with ApplicationLogger

This is the entry point for a EtlFlow Job application (See below sample).

import etlflow._
import etlflow.task._
import zio._

object MyJobApp extends JobApp {

 def executeTask(): Unit = logger.info(s"Hello EtlFlow Task")

 val task1: GenericTask[Unit] = GenericTask(
     name = "Task_1",
     function = executeTask()
 )

 def job(args: Chunk[String]): RIO[audit.Audit, Unit] = task1.execute
}

Attributes

Graph
Supertypes
trait ZIOAppDefault
trait ZIOApp
trait ZIOAppVersionSpecific
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Inherited types

type Environment = Any

Attributes

Inherited from:
ZIOAppDefault

Value members

Abstract methods

def job(args: Chunk[String]): RIO[Audit, Unit]

Concrete methods

final def execute(cliArgs: Chunk[String]): RIO[Audit, Unit]

This is the core function which runs the job with auditing (start and end).

This is the core function which runs the job with auditing (start and end).

It also converts command-line arguments passed to application into json key value pair. For e.g. if you run application with args "arg0 arg1 arg2 arg3" it will parse and convert these args to "{"0":"arg0", "1":"arg1", "2":"arg2", "3":"arg3"}"

Attributes

cliArgs

command-line arguments

final override def run: ZIO[ZIOAppArgs, Any, Any]

This is just a wrapper around default run method available with ZIOAppDefault to call execute(Chunk[String])

This is just a wrapper around default run method available with ZIOAppDefault to call execute(Chunk[String])

Attributes

Definition Classes
ZIOApp

Inherited methods

final def <>(that: ZIOApp)(implicit trace: Trace): ZIOApp

Composes this ZIOApp with another ZIOApp, to yield an application that executes the logic of both applications.

Composes this ZIOApp with another ZIOApp, to yield an application that executes the logic of both applications.

Attributes

Inherited from:
ZIOApp
final def exit(code: ExitCode)(implicit trace: Trace): UIO[Unit]

A helper function to exit the application with the specified exit code.

A helper function to exit the application with the specified exit code.

Attributes

Inherited from:
ZIOApp
final def getArgs(implicit trace: Trace): ZIO[ZIOAppArgs, Nothing, Chunk[String]]

A helper function to obtain access to the command-line arguments of the application. You may use this helper function inside your run function.

A helper function to obtain access to the command-line arguments of the application. You may use this helper function inside your run function.

Attributes

Inherited from:
ZIOApp
final def invoke(args: Chunk[String])(implicit trace: Trace): ZIO[Any, Any, Any]

Invokes the main app. Designed primarily for testing.

Invokes the main app. Designed primarily for testing.

Attributes

Inherited from:
ZIOApp
final def main(args0: Array[String]): Unit

The Scala main function, intended to be called only by the Scala runtime.

The Scala main function, intended to be called only by the Scala runtime.

Attributes

Inherited from:
ZIOAppPlatformSpecific (hidden)
def runtime: Runtime[Any]

Attributes

Inherited from:
ZIOApp

Concrete fields

val auditLayer: ZLayer[Any, Throwable, Audit]
override val bootstrap: ZLayer[ZIOAppArgs, Any, Environment]

A layer that manages the acquisition and release of services necessary for the application to run.

A layer that manages the acquisition and release of services necessary for the application to run.

Attributes

val name: String

Inherited fields

val environmentTag: Tag[Any]

Attributes

Inherited from:
ZIOAppDefault
lazy protected val logger: Logger

Attributes

Inherited from:
ApplicationLogger
protected val zioSlf4jLogger: ULayer[Unit]

Attributes

Inherited from:
ApplicationLogger

Implicits

Inherited implicits

implicit inline def validateEnv[R1, R, E, A](inline zio: ZIO[R, E, A]): ZIO[R1, E, A]

This implicit conversion macro will ensure that the provided ZIO effect does not require more than the provided environment.

This implicit conversion macro will ensure that the provided ZIO effect does not require more than the provided environment.

If it is missing requirements, it will report a descriptive error message. Otherwise, the effect will be returned unmodified.

Attributes

Inherited from:
ZIOAppVersionSpecific