opensearch send alert if no index name exists by date ,check daily index is created - opensearch

I was looking if any way to define opensearch alerts based on index names query
if daily index did not show up or get created send alert
if opensearch query by date indexname , if it doesnt match send alert
indexname-2022.mm-dd

Related

searching by exact value in existing varchar column vs add new boolean column

Which solution is better for performance in postgres database:
search by exact value of existing varchar column
create new boolean column in existing database and search by its value
table contains user id, date of planned job(reservation), date when started job, date when finished job, job name
for now it has around 10k records and it expand by around 2k/year
we want to allow job without earlier reservation but still keep log of start/end date so when backend detect this type of job and it create record with specific name
there is 2 way to see this records: by user which see only planned records and admins who see all
We can do it by excluding for user this specific name or create boolean column with value true if job was created by backend and false otherwise

Query items in dynamodb table within a numeric range

I need some guidance in implementing mail notifications for new chat messages. The mail notification would inform the user of all the chats that had new messages in the previous hour.
To get it done, I'll need to query all chats in a table within a time interval. First thing that came to mind was adding new global index where a hash would be a boolean for whether the chat has unread messages, and range would be timestamp for the latest message within that chat.
But I have learned that boolean hash keys are quite the anti-pattern, as they would squeeze the documents in a single partition.
Is there a different model that would allow us to query all items in a table within a numeric range?
I’m assuming that you want to query unread messages for a given user, since (again) I’m assuming that the read/unread status of a given notification should not change for one user if another user reads a notification for the same thing.
Going on that assumption, you should use a sparse index with the userId (or equivalent) as the hashkey and unreadNotificationTime as the sort key. When you insert a new notification into your table, set the value of unreadNotificationTime to the time stamp for the notification. When the user has read the notification, delete the unreadNotificationTime attribute from the item.
Why does this work?
DynamoDB only requires that an item has the key attributes of the base table, and any other attributes are optional. The way indexes work in DynamoDB is that an item from the base table will only appear in an index of the item has all of the key attributes of that particular index.
By setting a value for unreadNotificationTime when you store a notification, all newly created notifications will automatically be populated to the unread messages index. By deleting the unreadNotificationTime when a message is read, you the notification from that index. With this schema, there’s no need for any filtering or scan operations. Your index will only contain notifications that are unread, grouped by userId, and sorted by date.

Setting the 'query field' on an InfoPath Data Connection

I'm trying to follow some instructions with the first line:
1) Set the "query field" (Account Name in getUserProfileByName Secondary Recieve data source) to the Account Id of field selected in People Picker.
From here. But when I go try and edit queryfields it's greyed out? Ultimately I'm trying to populate fields when a user selects a user from a People Picker. Any help appreciated.
I'm using InfoPath 2013.
To autocomplete this you'll have to use a support or population-related field, with a new action rule. This is due to people picker fields not allowing any action rules applied to them.
Condition:
Use the condition DisplayName is not blank by using "Select a field or group..." in advanced view and selecting your people pickers field
Actions:
Set a field's value
Field: data connection queryFields DisplayName of people picker
Value: your forms DisplayName of people picker
Query using a data connection: getUserProfileByName / User Information List
Set a field's value
Field: your forms Department field
Value: data fields > Department of your data connection
Please note: getUserProfileByName / User Profile Service Data Connection no longer works in SharePoint Online and results in an error 5566. Please use a SharePoint list data connection to the hidden User Information List on the stem of your SharePoint site instead. It provides you with most of the same fields you'd find in getUserProfileByName, see below:
Name
Account
Work_email
Mobile_phone
About_me
SIP_Address
Is_Site_Admin
Deleted
Hidden
Picture
Department
Title
First_name
Last_name
Work_phone
User_name
Web_site
Ask_Me_About
Office
Picture_Timestamp
Picture_Placeholder_State
Picture_Exchange_Sync_State
Hope that helps!

DB2 records count

I have a simple user registration table that contains e.g. just two columns - event ID and user name who is registered to that event. This table can contain million of records. Now to show how many users registered to certain event I don't wanna execute SQL query Count(*) every time user loads event WEB-page. Instead of that I want to keep events' counts in a separate table and update that count once a new user registered. So I can use a TRIGGER that would update the counts once new record added/updated to the registration table. Is it a good approach? What if 1000 users are registered at the same time and 1000 records updated/created in registration table? Is TRIGGER gonna work correct? What is the best solution to autocalculate counts? Thanks

Searching data in the table that have database object

I have a client data base that has many values related to it.
Client name
Client address
Client code
Client dob
I need to show the client's name in table and allow user to search the client. I add the records to an array and show in a table.
for (Clientes *info in fetchedObjects10)
{
NSString* dict = info.name;
[dataArray addObject:dict];
}
I also create a filtered array for search. But when I search, how I would know which client is selected? How will get other info of that client?
For example, if I search for A in table then filter array is having only 2 elements. If I select the first item, how do I get that item's additional info like address, code, and dob?
As Per i understand your query. you can do it by two ways:-
1) pull all the database fields in the different array (client,client address,client code,client dob ).
search for the client array. The index it was successful pull the other fields from the array.
2) whenever you find the success in searching for the client. Again search the database with the query
sélect cient_address,client_code,client_dob from tablename where client_id=client;
Use the second method if you lot of data. but at the same time client should be the primary key for it.
Reply if there is some more need or your requirement is different.