def test_metadata_and_exclusion(sqlite_engine):
    """
    `metadata_cols` should be promoted to metadata and
    `excluded_text_cols` should remove columns from text.
    """
    reader = _create_reader(sqlite_engine)
    docs = _get_all_docs(
        reader,
        metadata_cols=[("id", "item_id"), "value"],
        excluded_text_cols=["value"],
    )

    doc = docs[0]
    # `value` excluded from text, included as metadata
    assert "value:" not in doc.text
    assert doc.metadata == {"item_id": 1, "value": 10}

    `metadata_cols` should be promoted to metadata and
    `excluded_text_cols` should remove columns from text.
    
llama-index-integrations/readers/llama-index-readers-database/tests/test_readers_database.py