def gather_comparison_stats()

in configurations/RedshiftConfigTestingLambda.py [0:0]


def gather_comparison_stats(script_s3_path, action, cluster_identifier, redshift_iam_role, bucket_name, db,
                            user, run_type, what_if_timestamp, comparison_stats_s3_path, external_schema_script,
                            query_label_prefix,node_type,number_of_nodes,region,cluster_config_s3_path):
    config=f'cluster_identifier,node_type,number_of_nodes,region\n{cluster_identifier},{node_type},{number_of_nodes},{region}'
    s3_put(cluster_config_s3_path+'/'+cluster_identifier+'.csv', config)
    try:
        run_sql(clusterid=cluster_identifier,
                db=db,
                user=user,
                script=external_schema_script,
                with_event=False,
                run_type='sync')
    except Exception as e:
        if "already exists" not in str(e):
            raise
    return run_sql_script_from_s3(script_s3_path=script_s3_path,
                                  action=action,
                                  cluster_identifier=cluster_identifier,
                                  redshift_iam_role=redshift_iam_role,
                                  bucket_name=bucket_name,
                                  db=db,
                                  user=user,
                                  run_type=run_type,
                                  what_if_timestamp=what_if_timestamp,
                                  comparison_stats_s3_path=comparison_stats_s3_path,
                                  query_label_prefix=query_label_prefix)