I have a sources table that has ID and Source(varchar)
1 Facebook
2 Twitter
3 Google
I have incoming data that has Source(varchar) and Views(Int)
Facebook 10
Twitter 12
Reddit 14
I want the kettle job to do this:
- Check if the source exists in the source table, and if so replace add a field of type INT called sourceID with the respective ID from source
- If it doesn't exist add it to the source table.
E.g. from the above data the result should be this
sourceID,Views
1,10
2,12
4,14 (Reddit wasn't in the table so it created it and the autoincrement gives it ID 4).
I am having trouble finding the right steps to achieve this