CFX Query Language allows to query the data in cfxDimensions platform in an effective and efficient way and is delivered as part of cfxDimensions platform.
The query construct is <conditions> <verb> <column name(s)>
Each CFXQL query can be one or more conditions followed by GET and then column names.
CONDITIONS GET col1, col2, col3
or
CONDITIONS GET col1, col2 as ‘LABEL1’. The example usage is
Equipment_Type is 'CHASSIS'orEquipment_Type is 'CHASSIS' and first_seen is after 'Sep 15 2020, 10am'or(Equipment_Type is 'CHASSIS') and (first_seen is after 'Sep 15 2020, 10am')
The following table shows all possible operations.
Op | Alternatives | Example Usage |
= | ==, eq, equal, equals , is eq, is equals, equals to, eq to, is equal to, is equals to , etc... | version == '12.1' `version` == '12.1' version is equal to '12.1' version is '12.1' |
!= | not eq, not equal, not equals , is not eq, is not equals, not equals to, not eq to, is not equal to, is not equals to, not-equals, not-eq, noteq, notequal, notequals, etc | version != '12.1' version is not equal to '12.1' version is not '12.1' |
> | gt, greater than, greaterthan, greater-than, is greater than, is greaterthan, etc | age > 20 age is greater than 20 |
< | lt, less than, lessthan, less-than, is less than, etc.. | age is lessthan 20 age less-than 20 |
>= | =>, gte, greater than or equal, is greater than or equal, is greater-than-or-equal etc... | age gte 20 age => 20 age is greater than or equal to 20 |
<= | =<, lte, less than or equal, etc... | age lte 20 age is less than or equal to 20 |
~ | contain, contains, is contains, does contain, does contains, has, etc.. | version ~ '"12.1" version contains "12.1" |
!~ | ~!, not contain, notcontain, does not contain, not contains, does not contain etc.. | version ~! '"12.1" version does not contain "12.1" |
? | match, matches, is matching, does match | version ? "^12.*" |
!? | not match, not matches, not matching, does not match | version !? "^12.*" |
^~ | starts with, startswith, start with, begin with, startwith etc... | version starts with '"12.1" version startswith "12.1" version ^~ '12.1' |
~$ | ends with, endswith, end with endwith etc... | version ends with '"12.1" version endswith "12.1" version ~$ '12.1' |
!^~ | not starts with, notstartswith, does not start with, not begin with | version starts with '"12.1" version startswith "12.1" version ^~ '12.1' |
!~$ | Not ends with, not endswith, not end with , not endwith etc... | version ends with '"12.1" version endswith "12.1" version ~$ '12.1' |
in | Is in, among, one of, any of | sw_type in "IOS", "UCS" sw_type in [ "IOS, "UCS" ] |
notin | not in, not-in, is not in, not one of, not any of, not among | sw_type not in "IOS", "UCS" sw_type is not in [ "IOS, "UCS" ] |
Op | Alternatives | Example Usage |
before | earlier than | ship_date is before 'Jan 1st 2017' ship_date is earlier than 3 months ship_date is before warranty_start warranty_end is before beginning of this month warranty_end is before end of last year |
after | later than | ship_date is after 'Jan 1st 2017' ship_date is later than 3 months ship_date is after warranty_start warranty_end is later than this month warranty_end is after next year |
during | | last_seen is during 'Sep 15, 2020 10am' to 'Sep 18, 2020 3:30pm' Ship_date is during CY2019 Ship_date is during this year |
notduring | not during | Ship_date is not during 'Jan 1, 2017' to 'Feb 15th 2019' Ship_date is not during CY2019 Ship_date is not during this year |
The following example queries are made against asset-db:assetLCMMaster.
All parent devices (Excluding FEXs) first seen since a specified timestamp
Parent_SN is Serial_Number and first_seen is not null and first_seen is after 'Sep 15 2020, 10am' \get IP_Address, Hostname, Product_ID, Site_Code, CAFM_Code, first_seen, last_seen, \Serial_Number, Device_Role
All Chassis first seen since a specified time
Equipment_Type is 'CHASSIS' and first_seen is not null and first_seen is after 'Sep 18 2020, 10am' \get IP_Address, Hostname, Product_ID, Site_Code, CAFM_Code, first_seen, last_seen, \Serial_Number, Device_Role
All Chassis not seen after a specified time
Equipment_Type is 'CHASSIS' and last_seen is not null and last_seen is before 'Sep 15 2020, 10am' \get IP_Address, Hostname, Product_ID, Site_Code, CAFM_Code, first_seen, last_seen, \Serial_Number, Device_Role