#NEWLINE# def __init__( self , id , input_node , output_node , schedule , resource = None , worker_group = None , script_uri = None , script_arguments = None , command = None , max_retries = None , depends_on = None , additional_s3_files = None ) : #NEWLINE# #INDENT# 'Constructor for the ShellCommandActivity class\n\n        Args:\n            id(str): id of the object\n            input_node(S3Node / list of S3Nodes): input nodes for the activity\n            output_node(S3Node / list of S3Nodes): output nodes for activity\n            schedule(Schedule): schedule of the pipeline\n            resource(Ec2Resource / EMRResource): resource to run the activity on\n            worker_group(str): the worker group to run the activity on\n            script_uri(S3File): s3 uri of the script\n            script_arguments(list of str): command line arguments to the script\n            command(str): command to be run as shell activity\n            max_retries(int): number of retries for the activity\n            depends_on(list of activities): dependendent pipelines steps\n            additional_s3_files(list of s3File): additional files for activity\n        ' #NEWLINE# if ( not isinstance ( schedule , Schedule ) ) : #NEWLINE# #INDENT# raise ETLInputError ( 'Input schedule must be of the type Schedule' ) #NEWLINE# #UNINDENT# if ( ( command is not None ) and ( script_uri is not None ) ) : #NEWLINE# #INDENT# raise ETLInputError ( 'command and script both can not be provided' ) #NEWLINE# #UNINDENT# if ( depends_on is None ) : #NEWLINE# #INDENT# depends_on = [ ] #NEWLINE# #UNINDENT# if ( max_retries is None ) : #NEWLINE# #INDENT# max_retries = MAX_RETRIES #NEWLINE# #UNINDENT# stage = ( 'true' if ( input_node or output_node ) else 'false' ) #NEWLINE# super ( ShellCommandActivity , self ) . __init__ ( id = id , retryDelay = RETRY_DELAY , type = 'ShellCommandActivity' , maximumRetries = max_retries , dependsOn = depends_on , stage = stage , input = input_node , output = output_node , runsOn = resource , workerGroup = worker_group , schedule = schedule , scriptUri = script_uri , scriptArgument = script_arguments , command = command ) #NEWLINE# self . add_additional_files ( additional_s3_files )