#NEWLINE# def __init__( self , table_definition , script = None , command = None , analyze_table = True , script_arguments = None , non_transactional = False , **kwargs ) : #NEWLINE# #INDENT# 'Constructor for the CreateUpdateStep class\n\n        Args:\n            **kwargs(optional): Keyword arguments directly passed to base class\n        ' #NEWLINE# if ( not exactly_one ( command , script ) ) : #NEWLINE# #INDENT# raise ETLInputError ( 'Both command and script found' ) #NEWLINE# #UNINDENT# if script : #NEWLINE# #INDENT# update_script = SqlScript ( filename = parse_path ( script ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# update_script = SqlScript ( command ) #NEWLINE# #UNINDENT# self . s3_source_dir = kwargs [ 's3_source_dir' ] #NEWLINE# sql_script = self . create_script ( S3File ( text = update_script . sql ( ) ) ) #NEWLINE# sql_script . upload_to_s3 ( ) #NEWLINE# dest = Table ( SqlScript ( filename = parse_path ( table_definition ) ) ) #NEWLINE# arguments = [ ( '--table_definition=%s' % dest . sql ( ) . sql ( ) ) , ( '--sql=%s' % sql_script . s3_path . uri ) ] #NEWLINE# if analyze_table : #NEWLINE# #INDENT# arguments . append ( '--analyze' ) #NEWLINE# #UNINDENT# if non_transactional : #NEWLINE# #INDENT# arguments . append ( '--non_transactional' ) #NEWLINE# #UNINDENT# if ( script_arguments is not None ) : #NEWLINE# #INDENT# if ( not isinstance ( script_arguments , list ) ) : #NEWLINE# #INDENT# raise ETLInputError ( 'Script arguments for SQL steps should be a list' ) #NEWLINE# #UNINDENT# arguments . extend ( script_arguments ) #NEWLINE# #UNINDENT# super ( CreateUpdateSqlStep , self ) . __init__ ( command = const . SQL_RUNNER_COMMAND , script_arguments = arguments , no_output = True , ** kwargs )