case class CmdScript(name: String = "cmd", description: Option[String] = None, winCmd: Option[String] = None, linuxCmd: Option[String] = None) extends CmdScriptBase with Product with Serializable
Execute a command on the command line and get its std output Command can be different for windows and linux operating systems, but it must be defined for at least one of them.
If return value is not zero an exception is thrown.
Note about internal implementation: on execution value of parameter map entries where key starts with - 'param' will be added as parameter after the docker run command, sorted by key. This allows to customize execution behaviour through Actions or DataObjects using CmdScript.
- name
name of the transformer
- description
Optional description of the transformer
- winCmd
Cmd to execute on windows operating systems - note that it is executed with "cmd /C" prefixed
- linuxCmd
Cmd to execute on linux operating systems - note that it is executed with "sh -c" prefixed.
- Annotations
- @Scaladoc()
- Alphabetic
- By Inheritance
- CmdScript
- Serializable
- Serializable
- Product
- Equals
- CmdScriptBase
- SmartDataLakeLogger
- ParsableScriptDef
- ParsableFromConfig
- ScriptDef
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
CmdScript(name: String = "cmd", description: Option[String] = None, winCmd: Option[String] = None, linuxCmd: Option[String] = None)
- name
name of the transformer
- description
Optional description of the transformer
- winCmd
Cmd to execute on windows operating systems - note that it is executed with "cmd /C" prefixed
- linuxCmd
Cmd to execute on linux operating systems - note that it is executed with "sh -c" prefixed.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- val description: Option[String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
execStdOutStream(configObjectId: ConfigObjectId, partitionValues: Seq[PartitionValues], parameters: Map[String, String], errors: Buffer[String] = mutable.Buffer())(implicit context: ActionPipelineContext): Stream[String]
Function to be implemented to execute command and return stdout as Stream of lines.
Function to be implemented to execute command and return stdout as Stream of lines.
- configObjectId
id of the action which executes this transformation. This is mainly used to prefix error messages.
- partitionValues
partition values to transform
- parameters
key-value parameters
- errors
an optional Buffer to collect stdErr messages
- returns
standard output of script as Stream of lines
- Definition Classes
- CmdScriptBase → ScriptDef
-
def
execStdOutString(configObjectId: ConfigObjectId, partitionValues: Seq[PartitionValues], parameters: Map[String, String], errors: Buffer[String] = mutable.Buffer())(implicit context: ActionPipelineContext): String
Function to be implemented to execute command and return stdout as String.
Function to be implemented to execute command and return stdout as String.
- configObjectId
id of the action or dataobject which executes this transformation. This is mainly used to prefix error messages.
- partitionValues
partition values to transform
- parameters
key-value parameters
- errors
an optional Buffer to collect stdErr messages
- returns
standard output of script as String
- Definition Classes
- CmdScriptBase → ScriptDef
-
def
factory: FromConfigFactory[ParsableScriptDef]
Returns the factory that can parse this type (that is, type
CO).Returns the factory that can parse this type (that is, type
CO).Typically, implementations of this method should return the companion object of the implementing class. The companion object in turn should implement FromConfigFactory.
- returns
the factory (object) for this class.
- Definition Classes
- CmdScript → ParsableFromConfig
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val linuxCmd: Option[String]
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- SmartDataLakeLogger
- Annotations
- @transient()
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- val winCmd: Option[String]
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated