Query Filter

Just another option to specify ComponentIds

The /QueryFilter is just antoher option to specify component IDs for your commands. You can specify AtomSphere API Query Filters as the source for any command.

See also Component Metadata Filter properties.

bc COMP GET -QueryFilter Query\qDBProfiles.json
{
  "QueryFilter": {
    "expression": {
      "operator": "and",
      "nestedExpression": [
        {
          "operator": "or",
          "nestedExpression": [
            { "property": "type",   "operator": "EQUALS",   "argument": [ "profile.db"   ] }
          ]
        },
        { "operator": "GREATER_THAN", "property": "modifiedDate",   "argument": ["{StartDateUtc}"]},
        { "operator": "EQUALS",       "property": "currentVersion", "argument": ["true" ]},
        { "operator": "EQUALS",       "property": "deleted",        "argument": ["false" ]}
      ]
    }}
}

Boomi Console will run the query against the Component Metadata API using ComponentMetadata/query. The returned components will be used as the input for your command. If you run COMP GET -QueryFilter <yourFilter>, for example, the query is executed and the returned list of components will then be retrieved from API.

Please notice, the QueryFilter functionality automatically handles the QueryToken so that the number of returned components is not limited to one page.

Query Filter File

Query Filters are specified as a JSON file. I recommend using the Query folder to store the queries there. I decided to use JSON over XML because it is much more readable. There is no option to provide XML queries.

Example

bc comp get /q query\qDBProfiles.json /outdir=query\DBProfiles

Specify /OutDir to redirect the output to the specified directory instead of writing it to the default Workspace\Out directory.

Once you have got the Metadata XML for profiles specified in the QueryFilter, you may want to see their natice specification:

bc create profile /outdir=query\DBProfiles

query\DBProfiles - MetadatXML and the native DB profile: SQL Scripts

Last updated