Skip to main content

4. 1 Queries

Queries are a powerful tool the officer can use to filter occurrences, validated reports, and original reports through various stages on the platform. The Officer can:

·        Filter the number of reports displayed based on the Officer’s selected parameters.

·        Export the result of a query to JSON or CSV formats.

4.1.1 Create a query

The Officer can access the Query Builder through the 'Data Management’ menu at the top of the page, then click on the 'Queries' option (Data Management > Queries).

image.png

In this section, the Officer will be able to create queries, share them with other users or manage queries shared by other users with the Officer.

‘In BO’ column indicates whether the query is included in a batch operation. The Officer can see the BOs using the query by hovering over the ‘edit properties’ option in the 3-dot menu.

‘To Lobby’ column, with values yes or no, filters if the query can be exported between UAT and PROD environments or between Authorities depending on whether the query to be exported has custom attributes. If it has custom attributes, it cannot be exported.

The Officer will have a library tree on the left panel, including all the libraries available to the Officer. Those are the folders that can have categories and subcategories. Find more information about Libraries in Query libraries section.

To view the Queries inside a library, category or subcategory, the Officer has to click on the corresponding folder.  The right side of the window will display the list of queries available for that selected folder:

image.png

 

The Officer can click the 'New Query' button to create a new one in the selected library or folder. A new window will be displayed with the Query Builder:

image.png

The Query Builder allows the Officer to build queries to search ORs, VRs, and OCs with attributes or metadata fields that meet the given conditions.

The queries are executed against the reports indexed in ElasticSearch.

The Officer has to fill in the unique Query Name for each Officer query and select a Library where to store the query. See Query libraries section for more information on the libraries.

Before executing, exporting or saving a query from the Query Builder, it is required to select over which reports the query will be executed on the ‘Count Number of Items’ section:

image.png

They will be activated as soon as the mandatory fields of the query are filled.

ECCAIRS queries (based on ECCAIRS Taxonomy)

·        Original Reports, including the ‘Archived’ ones

·        Validated Reports, including the ‘Archived’ ones (Draft versions are not included)

·        Occurrences: including ‘Archived’ ones (Draft versions are not included).

·        Occurrence shared with me: Occurrences shared by other Authorities, specifically with my Authority (so not the ones shared with us as they were shared to the ECR)

·        Occurrence + Shared: My major occurrences and the ones shared by other Authorities, specifically with my Authority

·        ECR: All occurrences shared to the ECR by mine and other Authorities (major versions only)

4.1.2 Query conditions – Attributes and metadata

Once in the Query Builder, the Officer has to select the query parameters to set each rule by clicking on ‘Select Attribute’ under the ‘Conditions’ section.

image.png

The system will display a modal window where the Officer can choose between:

·        Attributes: Any of the attributes available for the Officer’s Authority Taxonomy:

image.png

·        Metadata: additional information found at the database level that can be relevant for the Officer to query by:

·        e2id – E2 identifier of ORs, VRs or OCs

·        Audit fields – they refer to the information of the specific version of the report:

ü  au_creation_date: the date when the report has been created

ü  au_creation_user: user who has created the report

ü  au_modification_date: the last date the report was updated

ü  au_modification_user: the previous user that updated the report

ü  blocked – it is set to TRUE when a batch operation blocks the report to prevent the users from editing it

·        has_automatic_changes – it is set to TRUE when the report has had any automatic changes from the OR that no Officer has acknowledged yet.

·        has_conflicts – it is set to NOT NULL if the report (VR or OC) has any conflicts coming from an OR update.

·        last_shared_ecr – it determines the last time the OC was shared with the ECR

·        organisation name – the name of the Organisation of the reporter, if applicable.

·        personal_details – it is set to NOT NULL if there is any personal information from the reporter.

·        receiving__date – it determines when the OR was sent to the Authority.

·        reporting_entity_id – Authority to which the report belongs.

·        reporting_method – what reporting method was used to report the OR

·        responsible_entities_id – id of the responsible entity (Authority in E2)

·        status – the report status, as described in section 2.1 Occurrences lifecycle (OR to OC).

·        Version – version number

6.1.3                 Query structure

The queries are made using at least one rule. A rule is a condition the search made by the query has to meet.

Queries can also include various rules and groups of rules. A query can include one or more existing queries (subqueries). Queries cannot be edited while they are included as a subquery of another query.

A rule contains a condition to be met concerning an attribute or metadata field. Layouts and operators vary depending on the attribute and metadata field type, i.e.:

If the Officer selects ‘Air temperature’ as an attribute, the system will display ‘Value’ as the unique possible selectable layout and the Select Operator filter:

And will generate a ‘Decimals’ field to be filled out by the Officer.

Attributes

·        Alphanumeric and Text attributes or metadata fields can be searched in documents by a complete word using the layout ‘Value (Word)’ or by a string of characters using the layout ‘Text’. i.e.:

ü  Value (Word) in    ‘Aircraft’ (complete word)

ü  Text begins with ‘Airc’ (string of characters)

Data Type

Layout

Operators

Alphanumeric, Text

Value (Word)

equal

does not equal

in

not in

is null

is not null

Text

in

not in

begins with

does not begin with

ends with

does not end with

is null

is not null

·        Code attributes can be searched in documents using layouts:

ü  Value: selecting one or more values of the value list

ü  Level: when the value list has more than one level, selecting all the values of a branch (level) in the value list, starting from the selected value(s)

ü  Alias: when the value list has alias(es), selecting one of the them

Data Type

Layout

Operators

Code

Value

equal

does not equal

in

not in

is null

is not null

Level

* if the Value List has more than one level

equal

does not equal

in

not in

is null

is not null

Alias

* if the Value List has alias(es)

in

not in

begins with

does not begin with

ends with

does not end with

·        Code and Additional Text, Code or Alternative Text attributes can be searched in documents using layouts:

ü  Value: selecting one or more values of the value list

ü  Level: when the value list has more than one level, selecting all the values of a branch in the value list

ü  Alias: when the value list has alias(es), selecting one of them.

ü  Text: typing a string of characters

Data Type

Layout

Operators

Code and Additional Text, Code or Alternative Text

Value

equal

does not equal

in

not in

is null

is not null

Level

* if the Value List has more than one level

equal

does not equal

in

not in

is null

is not null

Alias

* if the Value List has alias(es)

in

not in

begins with

does not begin with

ends with

does not end with

Text

Used to search in the Text part of the attribute

in

not in

begins with

does not begin with

ends with

does not end with

is null

is not null

·        Date and DateTime attributes can be searched in documents using layouts:

ü  Value: when searching by date or range of dates

ü  Date of the Month (1-31): when searching by the day of the month

ü  Date of Week (1-7): when searching by the day of the week

ü  Month (1-12): when searching by the month

Data Type

Layout

Operators

Date, DateTime

Value

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

Day of the Month (1-31)

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

Day of Week (1-7)

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

Month

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

Year

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

·        Time attributes can be searched in documents using layouts:

ü  Value: when searching by hours and minutes

Data Type

Layout

Operators

Time

Value

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

is null

is not null

·        Latitude and Longitude attributes can be searched in documents using layouts:

ü  Value: when searching by degrees, minutes and seconds or range of them

Data Type

Layout

Operators

Latitude, Longitude

Value

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

is null

is not null

·        Decimal attributes can be searched in documents using layouts:

ü  Value: when searching by a decimal number

Data Type

Layout

Operators

Decimals

Value

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

is null

is not null

·        Number attributes can be searched in documents using layouts:

ü  Value: when searching by an integer number

Data Type

Layout

Operators

Number

Value

equal

does not equal

less than

less or equal

greater than

greater or equal

between

not between

is null

is not null

·        ECCAIRS Resource Locator attributes can be searched in documents using layouts:

ü  File Name: when searching by the name of an attached field

ü  Description: when searching by the description given in the attached field

Data Type

Layout

Operators

ECCAIRS Resource Locator

File Name

equal

does not equal

in

not in

is null

is not null

Description

equal

does not equal

in

not in

is null

is not null

·        ECCAIRS Embedded data attributes can be searched in documents using layouts:

ü  Eccairs number: when searching the former document’s Eccairs number

Data Type

Layout

Operators

Eccairs Embedded Data

ECCAIRS number

in

not in

begins with

does not begin with

ends with

does not end with

is null

is not null

·        ECCAIRS Data link attributes can be searched in documents using layouts:

ü  Eccairs number: when searching the former documents Eccairs number

Data Type

Layout

Operators

Eccairs Data Link

Eccairs number

in

not in

begins with

does not begin with

ends with

does not end with

is null

is not null

Groups can include one or more rules and one or more groups, combined with AND/OR clauses. The Officer can click on the ‘Add Rule’ button to add more rules. For groups, on the ‘Group’ tab. If the Officer wants different sets of rules to be evaluated together, the Officer has to click on the 'Add group' button. The Officer can also add groups inside other groups.

Groups and rules can be rearranged, dragging and dropping them where needed.

At the top centre of each group are the OCCURRENCE/ENTITY alternative tabs, which show whether conditions of the given attributes shall be met in any instance of the entity or if the conditions shall be met in the same instance of the entity. Thus, when specifying restrictions in a query, the restrictions can be evaluated across all the entities of a record at once OR can be evaluated to each entity of a record one by one. By default, the restrictions of a query will be evaluated across all the entities of a record at once, with the OCCURRENCE option selected by default.

With the selector OCCURRENCE/ENTITY, the Officer can change that, and the restrictions will be evaluated entity by entity. There is a limitation in creating groups based on the restriction selected here. If a group is restricted to ENTITY, no more groups can be added inside that ENTITY group.

Example of search by occurrence and by entity:

5.       OCCURRENCE: If we want to obtain the Occurrences where the Manufacturer model (21) is equal to ‘BOEING > 787’ and the Aircraft altitude (22) is greater than 1000 ft, independently if the conditions are met in different aircraft of an occurrence:

6.       ENTITY: If we want to obtain the Occurrences where the Manufacturer model (21) is equal to ‘BOEING > 787’ and the Aircraft altitude (22) is greater than 1000 ft when the conditions are met in the same aircraft.

The Officer can set rules with AND/OR clauses and combine them as needed with groups by clicking on the ‘Group tab’ and selecting AND/OR clauses, i.e.:

Subqueries: The officer can add a subquery to the query through the ‘Query’ tab. The aim is to add an existing query to the current query. When the Officer clicks on the ‘Query’ tab, the system will display the subquery section:

The Officer can click on ‘Select Query’, and the system will display a window to select the subquery:

Interfaz de usuario gráfica, Aplicación

Descripción generada automáticamente

The Officer must select a query from the available libraries and click ‘Add’. The system will add the subquery to the conditions of the current query. A query included as a subquery of another query cannot be edited.

6.1.4                 Query action buttons

Once the query is completed, the Officer can click on:

·        Cancel button: the system will return to the Queries page.

·        Execute button: the system will display the list of results according to the conditions set by the query.

·        Save button: The system will save the query in the list of queries of the selected library and display the table of queries with the new query on the queries page.

·        Execute button: the system will display the table of the specific reports based on the query's conditions. To re-execute the queries, the system provides the data menu that works as explained in the section Data menu - Refresh Queries.

·        Export button: this button only works when the Officer selects a type of report (OR, VR, OC, OC Shared with me, OC + Shared or ECR) with results for the current query. The Officer has to click on ‘Export’, and the system will display a modal window where the Officer can select the format (JSON or CSV):

·        Export in JSON: The window displays a Views tab. When the Officer clicks on it, the system displays a ‘Views’ modal window. The Officer must select one of the available views and click ‘Export’.

Once the process is finished, an email will be sent to the Officer with a zip file with the query results in the selected format.

·        Export in CSV: The Officer clicks on the ‘CSV’ tab, and the system displays a modal window where the Officer has to select between ‘Views’ and ‘Attributes’:

ü  If the Officer clicks ‘Views’, the system will display a ‘Views’ modal window. The Officer must select one of the available views and click ‘Export’. Once the process is finished, an email will be sent to the Officer with a zip file with the query results in CSV format.

ü  If the Officer selects ‘Attributes’, the system will display an Attributes List drop-down menu and a new Attributes List button:

The drop-down menu will provide the Attribute Lists created through ‘My account’. They are lists of attributes that the Officer is interested in and which they create through ‘My account’. See Export by Attribute for details.

If the attributes needed do not match any available Attribute Lists, the Officer can click on ‘New Attribute List’, and the system will display a modal window to create it:

Interfaz de usuario gráfica, Aplicación, Word

Descripción generada automáticamente

The Officer has to fill in the mandatory ‘Name’ field and deactivate the ‘Metadata fields’ if needed.

Below, the system displays the Taxonomy tree with all the ECCAIRS entities and attributes. The Officer can filter or navigate the tree to select the corresponding attributes. Once selected, they appear on the right-side panel. Attributes under the same entity can be reordered by dragging and dropping them. Then, the Officer has to click on the Save button:

Interfaz de usuario gráfica, Texto, Aplicación

Descripción generada automáticamente

The Officer will select the created Attribute List on the drop-down menu and will click on the ‘Export’ button:

Interfaz de usuario gráfica, Texto, Aplicación, Correo electrónico, Teams

Descripción generada automáticamente

Once the process is completed, the Officer will receive an email with the CSV file, including the results of the executed query.

6.1.5                 Management of queries – table of queries

The Queries menu displays the table of queries of the corresponding library, category or subcategory selected in the library tree:

Patrón de fondo

Descripción generada automáticamente con confianza media

Editing a query:

The Officer has to double-click on the specific query of the queries list or click on the ‘Edit’ option of the query’s 3-dot menu, and the system will display the editing page of the query:

Interfaz de usuario gráfica, Texto, Aplicación, Correo electrónico

Descripción generada automáticamente

The Officer has to introduce the needed update and click on ‘Save’, ‘Export’ or ‘Execute’, as needed. See the Query action buttons section for further details.

This page also provides:

·        Elastic Query Viewer button: it accesses the ElasticSearch Query Viewer window as follows:

Interfaz de usuario gráfica, Texto, Aplicación

Descripción generada automáticamente

Query viewer: opens the query viewer window as follows:

Interfaz de usuario gráfica

Descripción generada automáticamente con confianza media

Duplicating a query

The Officer can make a copy of an existing query and modify it.

The Officer has to click on the copy icon of the 3-dot menu of the specific query of the list of queries, and the system will display the Copy query window:

Interfaz de usuario gráfica, Texto, Aplicación, Correo electrónico

Descripción generada automáticamente

It is like the editing page above but with the mandatory Library field empty. The Officer has to fill in the library field with a library different from the original one, and then the Execute and Export button will be activated. The Save button is not available unless a Library is selected. The Officer has to introduce the needed update and click on ‘Save’, ‘Export’ or ‘Execute’, as needed. See the Query action buttons section for further details.

Sharing a query

Officers of the same Authority can exchange queries with each other, resulting in a notification being sent to the receiving Officers.

The Officer has to click on the Sharing option of the 3-dot menu of the specific query of the list of queries, and the system will display the Share query window:

Patrón de fondo

Descripción generada automáticamente con confianza baja

The Officer has to select ‘Share to User’, and then the system will display the ‘Users’ tab below.

Interfaz de usuario gráfica, Sitio web

Descripción generada automáticamente

The Officer has to click on ‘Users’, and the system will display the Available Users section:

Interfaz de usuario gráfica, Aplicación

Descripción generada automáticamente

The Officer has to check the specific Users and click on the ‘ADD’ button, then click the ‘Save’ button. The system will save the updates of the query in the database and return to the list of queries that will have added a Shared icon to the specific query:

The Officer then can click on the ‘Edit share’ option that will be added to the 3-dot menu of that query and add more users or remove some of them.

Deleting a query

The Officer has to click on the ‘Delete’ option of the specific query 3-dot menu of the list of queries, and the system will delete it and update the table of queries accordingly. A query cannot be deleted if used in Batch Operations or Query-based Notifications. See the Query-based notifications section for further details.

6.1.6                 Query libraries

All information presented in this section concerning the creation and management of libraries also applies to the section Word templates. The libraries store both queries and word templates.

The system provides the libraries available to the Officer on the left panel of the Queries menu:

Interfaz de usuario gráfica, Texto, Aplicación

Descripción generada automáticamente

My Personal Libraries

The queries stored in personal libraries are only available to the owner of the libraries. The owner can decide to share a particular query from the personal libraries or share the complete library with other Authority users. Only users with permission to execute queries will be eligible.

Local Common Library

The queries stored in the Local Common Library are available for all Authority users with permissions to queries. Officers cannot create, edit or delete queries in the Local Common Library. They can execute the queries or copy them to their personal libraries.

Shared with me libraries

When a library or query owner has shared the library or query with the Officer, it will appear under the ‘Shared with me libraries’. They can execute the queries or copy them to their personal libraries.

6.1.7                 Creation of a library

Once in the ‘Data management’ ‘Queries’ menu, the Officer has to click on ‘New Library’, and the system will display a modal window to create the library:

Interfaz de usuario gráfica, Aplicación

Descripción generada automáticamente

The Officer has to fill in the mandatory Name field, the Description if needed, and the Sharing mode, which can be ‘Personal’ or ‘Share to User’.

If ‘Share to User’ is selected, the system will display a section to choose the user/s:

Interfaz de usuario gráfica

Descripción generada automáticamente

Therein, the Officer has to select the specific users through the check box and click on the ‘ADD’ button, which will be activated. The selected users will be available on the ‘Selected Users’ tab.

The Officer has to click on ‘Save’ for both Personal or Shared to User, and the Library will be saved accordingly and will appear in the left pane under ‘My Personal Libraries’:

Interfaz de usuario gráfica, Aplicación

Descripción generada automáticamente

If the created library is ‘Shared to user’, it will show the ‘Shared’ icon Aplicación

Descripción generada automáticamente con confianza baja

Management of My Personal Libraries

The system provides the deleting, adding category and editing buttons next to each library under My Personal Libraries of the Officer.

 

Deleting a Library

The Officer has to click on the Delete icon (rubbish) next to the specific Library, and the system will delete the library from the My Personal Libraries tree as long as it has no more queries. Otherwise, the system will display a warning message and not delete the library. The library tree will be updated accordingly.

Adding a category or folder to a Library

The Officer has to click on the ‘+’ button next to the specific library, and the system will display a folder below the library:

Interfaz de usuario gráfica

Descripción generada automáticamente

The Officer has to type a Name and click on ‘Intro’. The folder or category will be added to the tree and will be available to store queries of the Officer:

Imagen que contiene Interfaz de usuario gráfica

Descripción generada automáticamente

Next to the folder or category, the management buttons will appear as follows:

Imagen que contiene Interfaz de usuario gráfica

Descripción generada automáticamente

The category can only be deleted if it does not include queries.

The ‘+’ button is to add subcategories. It works in the same way as adding categories to the library.

The edit button only updates the name, not the location of the category.

Editing a Library

The Officer has to click on the editing (pencil) icon next to the specific Library, and the system will display the editing window:

This page is the same as the library creation window of the previous section. The Officer must update the corresponding fields and click ‘Save’. The changes will be saved in the database and Library tree. 

Interfaz de usuario gráfica, Aplicación

Descripción generada automáticamente

6.2                      Word Templates

Word Templates in ECCAIRS2 are used to export reports in Word format. The Word template has to include the complete path of the attributes according to the Authority’s released taxonomy so that the system can fill each of the template fields with the corresponding attribute value in the report.

Each table in the Word Template corresponds to an entity in the taxonomy. i.e.:

The Word Template will have tags included in token « » with the following characteristics:

·        Attribute: A

·        Attribute custom: AC

·        Entity: E

·        Separation token: .

·        ID: TaxonomyCode

Examples:

·        «E1.A1» -> ENTITY.1.ATTRIBUTE.1

·        «E1.E45.AC1» -> ENTITY.1.ENTITY.45.ATTRIBUTES_CUSTOM.1

Depending on the attribute data type, it should be indicated what part of the attribute will be included in the Word Template:

Attribute Data Type

Field

Example

Date, Time, Text, Alphanumeric, Number

content (default)

«E1.A1»

Code

content (default)

«E1.A1»

Code and Additional Text

content (default)

additionalText

«E1.A1»

«E1.A1.additionalText»

Code or Alternative Text

content (default)

alternativeText

«E1.A1»

«E1.A1.alternativeText»

Decimal

content (default)

unit

«E1.A1»

«E1.A1.unit»

ECCAIRS Resource Locator

filename (default)

description

«E1.A1»

«E1.A1.description»

ECCAIRS Embedded Data

eccairsNumber (default)

«E1.A1»

ECCAIRS Data Link

eccairsNumber (default)

«E1.A1»

Latitude & Longitude

 

«E1.A1.degree»

«E1.A1.minutes»

«E1.A1.seconds»

«E1.A1.direction»

Once the Word template is configured, the Officer can save it into E2 libraries. This is the second menu of Data management:

It shares with the Queries menu, the library tree and the option to create libraries, categories and subcategories and manage them. All information presented in the section Query libraries is applicable here.

6.2.1                 Create a Word Template placeholder

To create a Word Template (from now on WT), the Officer has to click on ‘New WT’ at the top of the page, and the system will display a modal window to create it:

Interfaz de usuario gráfica, Texto, Aplicación, Correo electrónico

Descripción generada automáticamente

The Officer has to fill in the Name that has to be different from the existing ones, upload the needed Word Template file to the Template section through the ‘Select file’ button or drag and drop it to the section and select a Library, a category and a subcategory.

The description field is optional.

Then, the Officer has to click on the ‘Save’ button. The system will save the WT in the database, return to the WTs page, and add the specific WT to the table of WTs.

Interfaz de usuario gráfica, Aplicación, Teams

Descripción generada automáticamente

The saved WT will be available in the export options for ORs, VRs, and OCs in Word format. See the Export section, which applies to all reports, for further details.

6.2.2                 Management of Word Templates

Edit a WT

The Officer has to double-click on the Name of the specific WT of the list of WTs or click on the ‘Edit’ option of the 3-dot menu of the WT on the list, and the system will display the Edit window:

Interfaz de usuario gráfica, Texto, Aplicación, Correo electrónico

Descripción generada automáticamente

The Name field cannot be updated; only the other fields of the WT, including the library, can be updated.

The Officer has to update the corresponding fields, and click ‘Save’. The system will save the updates in the database and return to the WT menu with the updated list of WTs.

Copy a WT

The Officer has to click on the ‘Copy’ option of the 3-dot menu of the WT on the list, and the system will display the Copy WT window:

The management of this window is the same as the editing option above, with the only difference being that the Name field can be updated. The Officer can select a library different from where the WT was stored previously.

Share a WT

The Officer has to click on the ‘Share’ option of the 3-dot menu of the WT on the list and the system will display the Share WT window:

Patrón de fondo

Descripción generada automáticamente con confianza baja

This option works as described in the ‘Share a query’ section Management of queries – table of queries with the only difference being in the information shared.

Download a WT

The Officer has to click on the ‘Share’ option of the 3-dot menu of the WT on the list of WTs, and the system will download the WT.

Delete a WT

The Officer has to click on the ‘Delete’ option of the 3-dot menu of the WT on the list of WTs, and the system will delete it from the database and update the list of WTs accordingly.