-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a new mapper type isn't possible. #28
Comments
Can you elaborate on what conditional logic you want to implement. We can have a discussion around that. |
Example Table1 Table2 In table1 there are some keys which in merged table would become columns. MergedTable We wanted this type of customization which wasn't possible due to aforementioned problem. |
So, let me see if I got the requirement correct. You have table 1 as ACC1, EMAIL, [email protected] and you want to transform it into a table MergedTable as follows ACC1 ,[email protected],900 Is my understanding correct? |
Yes. Absolutely right.
This email and any files transmitted with it are confidential and intended |
Ok. So the problem with your ask is that data is to transform your data from EAV model to row model. This may work only if updates/deletes to both rows of ACC1 happen in the same transaction. Even then, it would be complex to merge the rows into 1 row. But actually, to do what you want to do, you dont need a mapper type interface. just keep firing queries such as update MergedTable set KeyX='Val' where entityId = 'ACC1'; and your Merged Table is ready. Say if you want to insert the merged table into HBase, This can be done for any of the databases. |
This is interesting approach Arya, works good for consumer stores which can accept data in columnar fashion and support ACID transaction. Was wondering what will be the approach if I want to index these 2 columns in ES for a given entity. I can model it as 2 different child documents of entity, so that updates can be independent or read the document and update it. Reading and updating will have consistency issues in corner cases, as ES is does not support ACID transaction. Another approach can be to treat these as a change singal and query the source of truth for all rows related to ACC1 and create the complete document for indexing. |
So, if we want to model our destination store in ES under the same conditions. IMO ,this will not be doable only in K-V stores where-in in-place updates are not possible. ( couchbase - membase bucket) |
We've already overriden and solved it. Only concern is if someone wants to On Thu, Aug 13, 2015 at 11:51 AM, Arya Ketan [email protected]
This email and any files transmitted with it are confidential and intended |
@dhirendrafkl do you have a fix that will address this issue? Happy to accept a pull request if the solution is generic enough. |
@regunathb Solution was implemented seperately without forking from aesop. This can be found at https://github.com/Flipkart/erp-change-propagation/tree/master/fklogistics-migration/fklogistics-hbase-consumer |
While we want to add new Mapper that would do mapping based on some conditional logic we found out that due to MapperType being an Enum, it isn't possible to customize it to add new mapper.
The text was updated successfully, but these errors were encountered: