Nodes/Nova Audio Player/Nova SQLite Reader ๐Ÿ—ƒ๏ธ
ComfyUI Node

Nova SQLite Reader ๐Ÿ—ƒ๏ธ

Your album metadata is in SQLite. Get it into the graph.

By NovaFemmeยทCreated 20 days agoยทUpdated 2 days agoยท 0
Nova SQLite Reader ๐Ÿ—ƒ๏ธ
    • table
    • record_count
    • column_count
    • column_headers
    • identity_json
    • value
    โ—„database_pathโ–บ
    โ—„table_namealbumsโ–บ
    โ—„columns*โ–บ
    โ—„whereโ–บ
    โ—„new_database_folderโ–บ
    โ—„new_database_nameโ–บ
    โ—„value_columnโ–บ
    โ—„column_setcustomโ–บ

    Every serious music workflow eventually ends up with a spreadsheet or a database holding the real metadata: track number, title, ISRC, catalogue number, credits. Retyping that into widgets is how you get a typo on track 7 that nobody notices until the distributor rejects the release.

    Nova SQLite Reader ๐Ÿ—ƒ๏ธ pulls a table into the graph as a NOVA_TABLE, which Nova Tag Writer can write onto files and Nova Master Identity can read for release metadata. One source of truth, typed once, in a database.

    Inputs

    • database_path - full path to an existing .db. Leave it empty and it uses the two fields below to create a new one - which is the path to feed from Nova NamePath Manager's split outputs when existing_database is off.
    • new_database_folder / new_database_name - where that new file goes. .db gets appended if you don't give an extension.
    • table_name - default albums.
    • columns - * for everything, or a comma-separated list.
    • where - empty selects all rows. This is raw SQL by design, so AND/OR/LIKE/IN/BETWEEN all work.
    • column_set - a preset that picks columns for you: custom, tags (the columns Nova Tag Writer writes) or identity (the columns that map onto Nova Master Identity). A preset only applies while columns is * or empty - type a column list and that wins. Columns a preset asks for that your table doesn't have are skipped, not an error, which is the difference between a preset and a nuisance.
    • value_column (optional) - name one column and it also comes out as plain text on the value output: lyrics, a comment, a path. When it's set, the query must return exactly one row, and the column must be among those selected (it always is with *).

    Outputs

    table (the NOVA_TABLE, for Tag Writer), record_count, column_count, column_headers (a real list output, so Nova Console prints it as one numbered block), identity_json, and value.

    identity_json is the quietly clever one: the single selected row mapped onto Nova Master Identity's own field names. Wire it into that node's identity_fields_json input and your catalogue becomes the source of truth for the release - no retyping after a browser reset, and no drift between what the database says and what the graph says.

    Read-only, and it means it

    The connection is opened read-only, identifiers (table, columns) are validated against the live schema and quoted rather than interpolated, and the where text - raw SQL because you asked for operators - is screened for statement separators and anything that writes. A typo in the WHERE box cannot modify your database. That's a real constraint on what you can do, and it's the correct trade for a node whose job is reading metadata you can't afford to corrupt.

    Install

    ComfyUI Manager โ†’ Nova Audio Player โ†’ install โ†’ restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/NovaFemme/ComfyUI-NovaAudioPlayer.git
    

    Under โ–ถ๏ธ Nova Audio โ†’ ๐Ÿ“ฆ Delivery & Metadata. SQLite is in Python's standard library, so there is nothing to install, no model to download, and no database server to run. If you installed the pack through Manager, the example database at examples/nova_album_example.db is there to poke at before you point it at your own library.

    The workflow this exists for

    Nova SQLite Reader ๐Ÿ—ƒ๏ธ โ”€โ”€ table โ”€โ”€โ–ถ Nova Tag Writer ๐Ÿท๏ธ โ”€โ”€ files โ”€โ”€โ–ถ Nova Tag Reader ๐Ÿ”–
            โ”‚ identity_json
            โ””โ”€โ”€โ–ถ Nova Master Identity ๐Ÿชช โ”€โ”€ archive_name โ”€โ”€โ–ถ Validator
    

    Read the database, write the tags onto the files, read the tags back to prove it landed - and use the same row to name and fingerprint the archived master. That's the whole delivery chain, and the reader is where the truth enters it. Mark a Length column skip (it's skipped by default) because duration comes from the audio stream and isn't a settable tag; everything else auto-maps to a tag name.

    Categoryโ–ถ๏ธ Nova Audio/๐Ÿ“ฆ Delivery & Metadata

    Inputs (8)

    NameTypeDefaultDescription
    database_pathSTRINGFull path to an existing .db file. Leave empty to create a new one below.
    table_nameSTRINGalbumsTable to read from.
    columnsSTRING** for every column, or a comma-separated list of column names.
    whereSTRINGEmpty selects all rows. Read-only SQL expression; AND/OR/LIKE/IN/BETWEEN etc. are all fine.
    new_database_folderSTRINGFolder for a new database, used only when database_path is empty.
    new_database_nameSTRINGFile name for the new database. '.db' is appended when no extension is given.
    value_columnoptSTRINGName one column to also return as plain text on the 'value' output - lyrics, a comment, a path. Empty leaves that output empty and changes nothing. When set, the query must select exactly one row, and the column must be among the columns selected (it always is when columns is '*').
    column_setoptCOMBOcustomPreset column selection. custom: use the columns field as typed. tags: the columns Nova Tag Writer writes. identity: the columns that map onto Nova Master Identity. A preset only applies while columns is '*' or empty - type a column list and that always wins. Columns a preset asks for that the table does not have are skipped, not an error.

    Outputs (6)

    NameTypeDescription
    tableNOVA_TABLEThe selected rows, for Nova Tag Writer.
    record_countINTNumber of rows returned.
    column_countINTNumber of columns returned.
    column_headersSTRINGColumn names, as a list output (one string per column).
    identity_jsonSTRINGThe single selected row mapped onto Nova Master Identity's field names. Wire it into that node's identity_fields_json input.
    valueSTRINGOne cell as plain text, for a STRING input such as Nova Lyric Score's reference_lyrics. Set value_column to switch it on.