Search Data

Catalyst Search enables you to search and retrieve data records from the Catalyst Data Store. You can execute a search query using the execute_search_query() method to search for a particular pattern of data.

Create a Dictionary

The following code snippet creates a dictionary that contains the attributes of the pattern to be searched for, in the indexed columns of the individual Data Store tables.

copy
#Create a dictionary
config = {
    'search': 'burrows*',
    'search_table_columns': {
        'Employee': ['EmployeeID'],
        'Users': ['Name']
    }
}

Execute Search Query

The dictionary object created in the previous section is passed as a parameter to the execute_search_query() method, which returns the response. To know more about the component instance search_service used below, please refer to this help section.

Parameters Used

Parameter Name Data Type Definition
config Object A Mandatory parameter. Will hold the details of the search patterns.
copy
#Execute Search query
search_service = app.search()
response_data = search_service.execute_search_query(config)

A sample response will be shown below :

copy
{
  AlienCity: [
    {
      CREATORID: "2136000000006003",
      MODIFIEDTIME: "2021-08-13 13:49:19:475",
      CITYNAME: "Dallas",
      CREATEDTIME: "2021-08-13 13:49:19:475",
      ROWID: "2136000000008508"
    }
  ]
}
Info : Refer to the SDK Scopes table to determine the required permission level for performing the above operation.

Last Updated 2025-03-28 18:24:49 +0530 IST