Skip to content

when metadata is not embedded, query fails on metadata fields #47

@cmatKhan

Description

@cmatKhan

Including when using set_filter

> py$callingcards_hf$clear_filter("annotate_features")
> py$callingcards_hf$set_filter("annotated_features_meta" , data_usable="pass")
> callingcards_data = py$callingcards_hf$query("SELECT * FROM annotated_features", "annotated_features")
Query execution failed: Binder Error: Referenced column "data_usable" not found in FROM clause!
Candidate bindings: "target_symbol", "background_total_hops", "target_locus_tag", "callingcards_enrichment", "regulator_symbol"

LINE 1: SELECT * FROM metadata_annotated_features WHERE data_usable = 'pass'
                                                        ^
Final SQL: SELECT * FROM metadata_annotated_features WHERE data_usable = 'pass'
Error in py_call_impl(callable, call_args$unnamed, call_args$named) : 
  ValueError: Query execution failed: Binder Error: Referenced column "data_usable" not found in FROM clause!
Candidate bindings: "target_symbol", "background_total_hops", "target_locus_tag", "callingcards_enrichment", "regulator_symbol"

LINE 1: SELECT * FROM metadata_annotated_features WHERE data_usable = 'pass'
                                                        ^
Run `reticulate::py_last_error()` for details.

Potential solution: Create a 'view' of the joined metadata and data in duckdb, and query that rather than the parquet file itself.

Note: once that duckdb file exists, we could eliminate the parquet file in order to save space. The parquet file would only be re-downloaded if refresh is True and kept around long enough to update the view, then deleted again

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions