Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
← Back to post

Revisions 2

Original
Ryan Hollister
196 × 4 Administrator
How do I get the Date of Birth (DOB) for a user?
How do I get the Date of Birth (DOB) for a user?
DOB is a relatively new field for us as we've not historically need it. For Financial Instutitions, they can call the core and retrieve it there. But for partners who want their integration to work with lots of financial instutitions, the data needs to come from the Q2 DB. We have started to bring in that data for some FIs. Note that you will still need to support DOB not being present at all since that is still very common. Introduce a DB Config so we can switch between the two possible locations. Then there are two places that should be checked for DOB: ``` if self.wedge_address_configs.get('dob_location',None) == 'UserDOB': user_obj = User(self.logger, self.hq_credentials) user_data = await user_obj.get(user_id=self.online_user.user_id) if len(user_data) > 0: dob = user_data[0].DOB else: data_obj = UserData(self.logger, self.hq_credentials) user_data = await data_obj.get(user_id=self.online_user.user_id, short_name='DateOfBirth') if len(user_data) > 0: dob = user_data[0].GTDataValue ```
DOB is a relatively new field for us as we've not historically need it. For Financial Instutitions, they can call the core and retrieve it there. But for partners who want their integration to work with lots of financial instutitions, the data needs to come from the Q2 DB. We have started to bring in that data for some FIs. Note that you will still need to support DOB not being present at all since that is still very common. Introduce a DB Config so we can switch between the two possible locations. Then there are two places that should be checked for DOB: ``` async def get_dob(self): dob_location = self.vendor_configs.get('DOB_Location') if dob_location and dob_location == 'User.DOB': user_svc = User(self.logger, hq_credentials=self.hq_credentials) db_users = await user_svc.get(self.online_user.user_id) if len(db_users) > 0 and getattr(db_users[0], 'DOB', False): return db_users[0].DOB.text else: return '' elif dob_location and dob_location.startswith('UserData'): user_data_svc = UserData(self.logger, hq_credentials=self.hq_credentials) user_data = await user_data_svc.get(self.online_user.user_id,dob_location.split('.')[1]) if len(user_data) > 0: return user_data[0].GTDataValue.text else: return '' else: return '' ```
4 years ago
Ryan Hollister
196 × 4 Administrator
How do I get the Date of Birth (DOB) for a user?

DOB is a relatively new field for us as we've not historically need it. For Financial Instutitions, they can call the core and retrieve it there. But for partners who want their integration to work with lots of financial instutitions, the data needs to come from the Q2 DB. We have started to bring in that data for some FIs. Note that you will still need to support DOB not being present at all since that is still very common. Introduce a DB Config so we can switch between the two possible locations. Then there are two places that should be checked for DOB: ``` async def get_dob(self): dob_location = self.vendor_configs.get('DOB_Location') if dob_location and dob_location == 'User.DOB': user_svc = User(self.logger, hq_credentials=self.hq_credentials) db_users = await user_svc.get(self.online_user.user_id) if len(db_users) > 0 and getattr(db_users[0], 'DOB', False): return db_users[0].DOB.text else: return '' elif dob_location and dob_location.startswith('UserData'): user_data_svc = UserData(self.logger, hq_credentials=self.hq_credentials) user_data = await user_data_svc.get(self.online_user.user_id,dob_location.split('.')[1]) if len(user_data) > 0: return user_data[0].GTDataValue.text else: return '' else: return '' ```