def get_output_path(spark, database, table):
    """
    Return the path where data should be written using database and table as argument
    """
    result = (spark.sql("describe formatted %s.%s" % (database, table))
                   .where("col_name='Location:'")
                   .collect())
    location = result[0]['data_type']
    return location