Startrekzky commented on issue #2361:
URL: 
https://github.com/apache/incubator-devlake/issues/2361#issuecomment-1168899685

   ## Pre-mapping logic for generating `account.csv`
   I suggest that we implement 'exact match' in v0.12.0, and fuzzy match 
according to user feedback in the following releases. What do you think? @klesh 
@yumengwang03 @hezyin 
   
   1. Based on all the `emails` in table.users, find the records under 
table.accounts that match the `email` field exactly.
      a) relate accounts.id to users.email, and write the relationship between 
accounts.id and users.id to table.user_accounts, i.e. (U001, a1), (U001, a2), 
(U002, a3), (U004, a4), (U005, a5), ( U005, a6) in the following pic.
      b) the accounts.id not associated to users.email will be the next 
matching range, i.e. (a7, a8, a9, a10).
   2. Based on all the `names` in table.users, find the exact match of the 
`full_name` field under table.accounts for the remaining table.accounts in step 
1
      a) write the relationship between accounts.id and users.id to 
table.user_accounts, i.e. (U005, a7), (U008, a8)
      b) the accounts.id not associated to users.name will be the next matching 
range, i.e. (a9, a10).
   3. Based on all the names in table.users, find the exact match of the 
`user_name` field under the remaining table.accounts in step 2.
      a) associate accounts.id to users.name, and relate accounts.id to 
users.id to table.user_accounts, i.e. (U010, a10)
      b) accounts.id not associated to users.name, i.e. a9, is not associated 
to any existing users. in addition, (U003, U006, U007) in table.users is also 
not associated to any accounts.id.
   
   An example:<br/>
   
![image](https://user-images.githubusercontent.com/14050754/176224502-6db9d0f8-daa2-4338-a05f-ddd8fce8a149.png)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to