Crawford Collins

04/24/2020, 5:59 PM
I've having a little trouble using the SQLiteQuery task. 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.
def test_meta_model_regression():
    meta_model_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?


04/24/2020, 6:09 PM
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!

Crawford Collins

04/24/2020, 7:36 PM
thank you
👍 1