def _spray_stringified_data(connection, data, record_set, logical_file,
    overwrite, delete_workunit):
    """
    Spray stringified data to a HPCC logical file. To generate the
    stringified data and recordset, see `stringify_rows()` &
    `make_record_set()`

    Parameters
    ----------
    connection: `Connection`
        HPCC Connection instance, see also `Connection`.
    data: str
        Stringified data generated by `stringify_rows()`.
    record_set: str
        Recordset generated by `make_record_set()`.
    logical_file: str
        Logical file name on THOR.
    overwrite: bool
        Should the file overwrite any pre-existing logical file.
    delete_workunit: bool
        Delete the workunit once completed

    Returns
    -------
    None
    """
    script_content = (
        "a := DATASET([{}], {{{}}});\nOUTPUT(a, ,'{}' , EXPIRE(1)".format(
        data, record_set, logical_file))
    if overwrite:
        script_content += ', OVERWRITE'
    script_content += ');'
    connection.run_ecl_string(script_content, True, delete_workunit, stored
        =None)
