Exam MCD - Level 1 All QuestionsBrowse all questions from this exam
Question 65

A Database On Table Row listener retrieves data from a CUSTOMER table that contains a primary key user_id column and an increasing login_date_time column. Neither column allows duplicate values.

How should the listener be configured so it retrieves each row at most one time?

    Correct Answer: A

    To ensure that each row is retrieved at most one time, the listener should be configured using the login_date_time column as the watermark. The login_date_time column is appropriate because it contains unique, incrementing values that reflect the time each user logs in. This ensures that the listener retrieves only new rows with login_date_time values greater than the last retrieved value, thus preventing the same row from being retrieved more than once.

Discussion
pgarciarOption: A

A is the correct answer.

MaxroyoOption: A

* Watermark allows the poll scope to poll for new resources instead of getting the same resource over and over again. * The database table must be ordered so that the "watermark functionality" can move effectively in the ordered list. Watermark stores the current/last picked up "record id." * If the Mule application is shut down, it will store the last picked up "record id" in the Java Object Store and the data will continue to exist in the file. This watermark functionality is valuable and enables developers to have increased transparency. * Developers do not need to create code to handle caching; it is all configurable! * There are two columns and both are unique but user_id can't guaranty sequence whereas date_time will always be in increasing order and table content can easily be ordered on the basis of last processed date_time. So correct answer is: Set the watermark column to the date_time column

Rahul_16Option: A

A is correct. It is done on column not on value

RoyalCasa

Because the user_id column can be unique but need not be incremental / higher than the previous user_id. Whereas in case of timestamp, it would always be HIGHER than the previous one. So that would be the ideal watermark column.

ck0241

Good explanation, thank you. I wonder what is the importance of ''At most one value' in the question.

ajcachoOption: A

This is a scenario for watermarking, therefore A has to be the answer, not the pointed B option ('On Table Row' doesn't even have a target parameter as seen in https://docs.mulesoft.com/connectors/db/database-documentation)

Yug21Option: B

I am doubtful about option A. Consider a scenario, the user logged in at time A and the row was retrieved by the listener. The same row can be retrieved again if the user logs in later sometime (the logged in column gets updated to the latest time for the same row and possibly greater than watermarking column value), but the question says "each row should be retrieved at most one time". Example: UserId LoginTime 1 10:00 AM At this point of time, watermarking column value = 10:00 AM Later some time same user again logs in then UserId LoginTime 1 12:00 AM This time as the column value is greater than the watermark column value, it will be again retrieved which is against question statement. Is this a valid scenario, can someone please explain? Thanks

notthatgerry

I think the statement refers to the fact that every row in login_date_time column is unique as user_id is aswell, so the timestamp for login at 10:00AM and login at 12:AM are two different time stamps taking into consideration that a timestamp has the format yyyymmdd hh:mm:ss.00 in general, so as you can see hardly two users will login at the same time. Also please take into consideration the following: a system as the one described can be used to provide anonymous access to a certain resource, so no matter if the same person access the resource twice, the application generates a unique radomized user_id every time the user access the application. This kind of systems are usefull to generate access tokens so if an unauthorized agent gets an user_id already used, they will not be able to access the resource.

Ella_ZOption: B

"Neither column allows duplicate values." if there have two user click in same time, them the timestamp may same. So I think the B is correct.

Anseal

I wonder why is D incorrect? I would choose both A and D.

VickySoniOption: D

Watermark should be set on Primary key, so D should be the answer.

kampatraOption: A

A is Correct

KbessadiOption: A

A is the correct answer

frediepulgosoOption: A

A is correct

kubota_dumpOption: B

B is the correct answer.

kubota_dump

A. Set the watermark column to the login_date_time column

senthil_Kumar_MuruganOption: A

Set the watermark column to the login_date_time column