Module Expr Str Import alias Import alias identifier Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr Print BinOpMod Str NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str NameLoad Assign NameStore IfExp CompareGt NameLoad Num BinOpMod Str NameLoad Str If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpMod Str NameLoad orelse Assign NameStore Str Assign NameStore ListLoad NameLoad Assign NameStore Str For NameStore NameLoad body If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad Str attr keyword IfExp UnaryOpNot NameLoad Str Str keyword IfExp NameLoad Str Str keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore GeneratorExp Call AttributeLoad Str attr keyword NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Str attr keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad ListComp SubscriptLoad NameLoad Index Str comprehension NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Print NameLoad Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad attr Index Num Index Num Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr orelse Assign NameStore Call NameLoad ListComp Call AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad If CompareNotEq NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr keyword Call AttributeLoad Str attr NameLoad keyword Call AttributeLoad Str attr NameLoad Raise Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd BinOpMult Str Num Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad For NameStore Call AttributeLoad NameLoad attr body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Raise NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list
N/A N/A Replacement for the load step to use the redshift COPY command instead
 N/A argparse N/A pandas.io.sql pdsql N/A psycopg2.extras dataduct.config get_aws_credentials dataduct.data_access redshift_connection dataduct.database SqlStatement dataduct.database Table dataduct.utils.helpers stringify_credentials sys stderr load_redshift N/A N/A table input_paths max_error replace_invalid_char no_escape gzip command_options N/A 0 None False False None N/A N/A Load redshift table with the data in the input s3 paths
     N/A table_name N/A table full_name N/A N/A Loading data into %s table_name N/A N/A aws_key aws_secret token N/A get_aws_credentials N/A creds N/A stringify_credentials aws_key aws_secret token N/A delete_statement N/A TRUNCATE %s; table_name N/A error_string N/A N/A max_error 0 N/A MAXERROR %d max_error N/A N/A replace_invalid_char None N/A N/A invalid_char_str N/A ACCEPTINVCHARS AS %s replace_invalid_char N/A N/A invalid_char_str N/A query N/A delete_statement N/A template COPY {table} FROM '{path}' WITH CREDENTIALS AS '{creds}' COMPUPDATE OFF STATUPDATE OFF {options}; N/A input_path input_paths N/A N/A N/A command_options N/A N/A command_options N/A N/A DELIMITER '	' {escape} {gzip} NULL AS 'NULL' TRUNCATECOLUMNS {max_error} {invalid_char_str} format escape N/A N/A no_escape ESCAPE gzip N/A gzip GZIP max_error error_string invalid_char_str invalid_char_str N/A statement N/A N/A template format table table_name path input_path creds creds options command_options N/A N/A N/A query append statement N/A N/A N/A join query N/A create_error_retrieval_query N/A N/A input_paths N/A N/A N/A condition N/A N/A N/A filename Like '%{input_path}%' format input_path input_path N/A input_path input_paths N/A conditions N/A N/A  OR  join condition N/A query N/A N/A SELECT * FROM stl_load_errors WHERE {conditions} format conditions conditions N/A query N/A get_redshift_table_colunms N/A N/A table cursor N/A N/A N/A table_name N/A table table_name N/A schema_name N/A table schema_name N/A set_search_path_query N/A N/A SET search_path TO {schema} format schema schema_name N/A N/A N/A cursor execute set_search_path_query N/A query N/A N/A SELECT def.column FROM pg_table_def def WHERE schemaname = '{schema_name}' AND tablename = '{table_name}' format schema_name schema_name table_name table_name N/A N/A N/A cursor execute query N/A columns N/A sorted N/A N/A row N/A column N/A row N/A N/A cursor fetchall N/A columns N/A create_load_redshift_runner N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser N/A N/A N/A parser add_argument --table_definition dest table_definition required True N/A N/A N/A parser add_argument --max_error dest max_error default 0 type int N/A N/A N/A parser add_argument --replace_invalid_char dest replace_invalid_char default None N/A N/A N/A parser add_argument --no_escape action store_true default False N/A N/A N/A parser add_argument --gzip action store_true default False N/A N/A N/A parser add_argument --command_options dest command_options default None N/A N/A N/A parser add_argument --s3_input_paths dest input_paths nargs + N/A N/A N/A parser add_argument --force_drop_table dest force_drop_table default False N/A script_arguments N/A N/A parser parse_args N/A script_arguments N/A table N/A Table N/A SqlStatement N/A script_arguments table_definition N/A connection N/A redshift_connection cursor_factory N/A N/A psycopg2 extras RealDictCursor N/A table_not_exists N/A N/A N/A N/A N/A pdsql read_sql N/A N/A N/A N/A table check_not_exists_script sql connection loc N/A 0 N/A 0 N/A cursor N/A N/A connection cursor N/A table_not_exists N/A N/A N/A N/A cursor execute N/A N/A N/A N/A table create_script sql N/A N/A columns N/A sorted N/A N/A N/A N/A column column_name lower N/A column N/A N/A table columns N/A redshift_table_columns N/A get_redshift_table_colunms table cursor N/A N/A columns redshift_table_columns N/A N/A error_string N/A N/A Table schema mismatch: {table}
Columns for new table: {columns}
Columns for existing table: {redshift_table_columns} format table N/A table full_name columns N/A N/A ,  join columns redshift_table_columns N/A N/A ,  join redshift_table_columns N/A N/A Exception error_string N/A load_query N/A load_redshift table N/A script_arguments input_paths N/A script_arguments max_error N/A script_arguments replace_invalid_char N/A script_arguments no_escape N/A script_arguments gzip N/A script_arguments command_options N/A N/A N/A N/A N/A cursor execute load_query N/A N/A N/A cursor execute COMMIT N/A N/A N/A Exception N/A error N/A N/A error_query N/A create_error_retrieval_query N/A script_arguments input_paths N/A N/A N/A cursor execute error_query N/A separator N/A N/A - 50 N/A N/A N/A stderr write N/A N/A Error while loading data into redshift 

{} format separator N/A item N/A N/A cursor fetchall N/A N/A key item N/A N/A N/A N/A stderr write N/A N/A {}: {}
 format key N/A N/A N/A str N/A item N/A key strip N/A N/A N/A stderr write separator N/A error N/A N/A N/A cursor close N/A N/A N/A connection close N/A