title: Data integration for Magento to Quick Book
body: <p>I'm currently new to Talend and I'm learning through videos and documentation, so I'm just not sure how to approach/implement this with best practices.</p>
  
  <p><strong>Goal</strong></p>
  
  <p>Integrate Magento and Quick Book using Talend.</p>
  
  <p><strong>My thoughts</strong></p>
  
  <p>Initially my first thought was I will setup direct DB connection for Magento and will take relevant data which I need and will process it and will send to QuickBook using REST API's(specifically bulk API's in batch)</p>
  
  <p>But then again I thought it would be little hectic for me to query Magento database(multiple joins) so I've another option to use Magento's REST API.</p>
  
  <p>But as I'm not much familiar with the tool I'm struggling little to find best suitable approach, so any help is appreciated.</p>
  
  <p><strong>What I've done till now?</strong> </p>
  
  <ol>
  <li>I've saved my auth(for QB) and db(Magento) credentials data in file and using <strong>tFileInputDelimited</strong> and <strong>tContextLoad</strong>, I'm storing them in context variables so they can be accessible globally.</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/MUO7x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MUO7x.png" alt="enter image description here"></a></p>
  
  <ol start="2">
  <li>I've successfully configured database connection and dbinput but I've not used metadata for connection(should I use that and if Yes how can I pass dynamic values there?). I've used my context variables data in db connection settings.</li>
  <li>I've taken relevant fields for now but if I want multiple fields simple query is not enough as Magento stores data in multiple tables for Customer etc but it's not big deal I know but I think it might increase my work.</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/TKkkA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TKkkA.png" alt="enter image description here"></a></p>
  
  <p>For now that's what I've built and my next step is send the data to QB using REST while getting access_token and saving it to context variable and again storing the QB reference into Magento DB.</p>
  
  <p>Also I've decided to use QB bulk API's but I'm not sure how I can process data in chunks in Talend(I tried to check multiple resources but no luck) i.e. if the Magento is returning 500 rows I want to process them in chunks of 30 as QB batch max limit is 30, so I will be sending it using REST to QB and as I said I also want to store back QB reference ID in magento(so I can update it later).</p>
  
  <p>Also this all will be on local, then how can I do same in production? how I can maintain development and production environment?</p>
  
  <p><strong>Resources I'm referring</strong> </p>
  
  <p>For REST and Auth best practices - <a href="https://community.talend.com/t5/How-Tos-and-Best-Practices/Using-OAuth-2-0-with-Talend-to-Access-Goo" rel="nofollow noreferrer">https://community.talend.com/t5/How-Tos-and-Best-Practices/Using-OAuth-2-0-with-Talend-to-Access-Goo</a>...</p>