Category Archives: Uncategorized

Streaming Twitter Data into Kafka- Python code

Below is a simple python based Kafka producer which reads data from twitter and puts data into kafka topicYou will have to register with twitter to get tweets streamed into this app.After registration you will have your own access_tokens,access_token_secret,consumer_key,consumer_secret . Install tweepy and twitter libraries using below command pip install… Read more »

SPARK : How to generate Nested Json using Dataset

I have come across requirements where in I am supposed to generate the output in nested Json format.Below is a sample code which helps to do the same.The input to this code is a csv file which contains 3 columns . company name department employee name Example: google,jessica,sales google,sita,technology We… Read more »

VTD Xml Example

baahu   January 23, 2017   10 Comments on VTD Xml Example

VTD-XML is a good alternative to Simple API for XML (SAX) and Document Object Model (DOM), as it does not force you to trade processing performance for usability. The Java-based, non-validating VTD – XML parser is faster than DOM and better than SAX.Unlike other XML processing technologies, VTD-XML is designed… Read more »