How Do I Create a Meta Query?

4 min. readlast update: 10.28.2024

Meta Query is a powerful tool in Keystone Client that allows you to create custom data extracts from your Keystone database. 

Here's a step-by-step guide to creating a Meta Query: 

Step 1: Open Keystone Client and select the Meta Query icon. You can find this icon on the front screen of Keystone Client. It's a yellow barrel with a magnifying glass in front of it. Note: all Keystone Client screens must be closed to access this icon.

undefined

Step 2: In Meta Query, there are 5 tabs on the left side: 

  • Queries: Find/Run existing queries
  • Tables: Collections of data fields (Note: start here to create a new query)
  • Fields: Data fields for the query
  • Query Dates: Detail list of existing queries
  • Scheduled: Detail list of scheduled queries

undefined

Step 3: On the left side of the screen, you will see a list of Keystone Meta Tables and Customer Meta Tables. Some of these tables are in folders, which you will need to click on to display the Meta Tables within. Select the Meta Table that contains the information you need to query. For example, select "Employee Data" for this demonstration.

undefined

Step 4: If you need more detailed explanations on what fields/info each Meta Table contains, you can refer to two documents: The first document is called "Full List of KEMS Files and Fields" and is located in the Documents tab on the Client Care website. The second document is named "FIS Data Files and Fields" and is located in our Documents tab on the Client Care website.

undefined

 

undefined

Step 5: Once you have selected the Meta Table, the tab on the left side of the screen will switch to "Fields." You can now select the fields you want to include in your query by selecting them. For example, you can select "Name" and "Birthday" fields for this example. If you need to know exactly which file and field needs to be selected, select "Display Properties" at the top of the active list. The "File" and “Field” will be displayed next to the Field name in the Field Tab. 

undefined

 Step 6: Once you have selected the fields you want to include in your query, you can see their names displayed on the right side of your screen in the Meta Query.

undefined

Step 7: To narrow down the data you want to extract, you need to add a piece of criteria. To do this, select the "Show/Hide Criteria" button. This button will have a pencil and glasses in front of it, and it's located at the top of the screen. This will display the "Criteria Window" above the active query.

undefined

 Step 8: Right-click on the "Criteria Window" and select "Add Criteria". This will open a new window where you can add your criteria. In this window, you can select the field you want to add criteria to and choose a condition. For example, if you want to extract data for employees born after a certain date, you can select the "Birth Date" field and choose the "greater than" condition.

undefined

 

undefined

Step 9: Once you have selected your field and condition, you need to enter a value. This value will depend on the condition you have chosen. For example, if you chose the "greater than" condition for the "Birth Date" field, you would enter a date in the format "mm/dd/yyyy" to specify the date after which you want to extract data. Hint: If you would like to see what the Value options are for that particular field, you can select the Values... button to pick from a list.

undefined

Step 10: You can add multiple criteria to your query by repeating steps 8 and 9. This allows you to narrow down the data even further and extract only the data you need.

undefined

Step 11: Once you have added your criteria, you can preview your query by selecting the "Preview" button (silver barrel with a green lightning bolt) located at the toolbar. This will display a limited amount of data that meets your criteria in a table format.

undefined

Step 12: To run the full query, select the “Run Query” button (Yellow Barrel with a green lightning bolt) located on the toolbar. This will display the full amount of amount of data that meets your criteria in a table format.

undefined

Step 13: If you're satisfied with the data, you can save your query by selecting the "Save As" button on the toolbar– this will allow you to reuse the query in the future, without having to recreate it from scratch.

undefined

undefined

Remember: You can always select the Excel icon to export the query to Excel if you need to manipulate columns, sort, etc. 

Was this article helpful?