flow sub-schema in assay schema hides real flow schema for user-defined queries

Flow Forum (Inactive)
flow sub-schema in assay schema hides real flow schema for user-defined queries Andy Straw  2013-02-18 12:44
Status: Closed
 
We have some queries that broke when we upgraded to either 12.2 or 12.3. The queries were user-defined queries in the assay schema that were trying to join some data from general purpose assays with data from the FCSFiles table of the flow schema. The error we got when trying to save or execute the queries was that there was no flow.FCSFiles table. I notice that there is now a sub-schema under assay called Flow. I'm guessing that the query parser is treating our reference to flow.FCSFiles as a reference to the flow sub-schema of assay (which does not have an FCSFiles table), rather than the top-level flow schema (which does have an FCSFiles table). I was able to fix the broken query by doing either of the following:

1. Moved the query from the assay schema to the flow schema, and then prepended "assay." to the names of the general purpose assays referenced in the query. (This was not a preferred approach for us.)

2. Left the query in the assay schema, but prepended the container name to the reference to "flow.FCSFiles", something like "/MyProject/MyFolder/MySubfolder".flow.FCSFiles.

We don't like #2 either, since moving the query or changing the folder structure breaks it. Is there a way to namespace the reference to the flow.FCSFiles table to force it to be the "top-level" flow schema, rather than the sub-schema of the current (assay) schema?

Thanks.

Andy Straw
University of Rochester
 
 
kevink responded:  2013-02-18 16:22
For a variation on #2, you can use the special top-level schema "Folder" which resolves to the current folder's schema. For example, you should be able to execute the query in the assay schema:

SELECT * FROM Folder.flow.FCSFiles
 
Andy Straw responded:  2013-02-19 11:13
That's just the kind of thing I was looking for. Thanks.

Andy