I've having a little trouble using the SQLiteQuery...
# prefect-community
c
I've having a little trouble using the SQLiteQuery task. https://docs.prefect.io/api/latest/tasks/sqlite.html#prefect-tasks-database-sqlite-sqlitequerytask I'm trying to pass the db name as a parameter, but it is not working. The query task does not accept parameters, only string. I've attached a concise version of my code and error message below.
Copy code
def test_meta_model_regression():
    meta_model_run = meta_model_flow.run(
        db = "test.db",
    )
    assert meta_model_run.message == "All reference tasks succeeded."

with Flow("meta_model_flow") as meta_model_flow:
    db = Parameter("db")
    models = SQLiteQuery(db,"SELECT identifier FROM models")

>> TypeError: expected str, bytes or os.PathLike object, not Parameter
Is there some way to pass the parameter "test.db" to the query?
j
Hi @Crawford Collins - Thanks for the question. Give me a few minutes to check that for you.
Hello again @Crawford Collins - this looks like a design flaw/bug in the SQLIteQuery task. It doesn't currently allow db to be set at runtime. Thank you for pointing it out to us and we'll get a fix in for it asap!
c
thank you
👍 1