One Star

Using and insert Json format in Neo4j

Hi,
Please i need help,
i have a file (.CSV) contains many of row. type of these rows is (Json) extract from twitter with API. how i can use these file for extract data? and can i load Json type of data in a graphe database (Neo4j)?
Exemple for data save in CSV file
{"created_at":"Sun Dec 22 17:50:21 +0000 2013","id":414815183127588865,"id_str":"414815183127588865","text":"RT @kdnuggets: Top stories, Dec 15-21: R leading, Python gaining; LinkedIn Groups re-analyzed; Monetizing, Not Managing Big Data http:\/\/t.c\u2026","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":2219944622,"id_str":"2219944622","name":"PS","screen_name":"approximatesign","location":"","url":null,"description":null,"protected":false,"followers_count":0,"friends_count":12,"listed_count":0,"created_at":"Thu Nov 28 15:39:09 +0000 2013","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":2,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/abs.twimg.com\/sticky\/default_profile_images\/default_profile_0_normal.png","profile_image_url_https":"https:\/\/abs.twimg.com\/sticky\/default_profile_images\/default_profile_0_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":true,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sun Dec 22 15:47:14 +0000 2013","id":414784201964011520,"id_str":"414784201964011520","text":"Top stories, Dec 15-21: R leading, Python gaining; LinkedIn Groups re-analyzed; Monetizing, Not Managing Big Data http:\/\/t.co\/AaJBEDei5f","source":"\u003ca href=\"http:\/\/twitterfeed.com\" rel=\"nofollow\"\u003etwitterfeed\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":20167623,"id_str":"20167623","name":"Gregory Piatetsky","screen_name":"kdnuggets","location":"Brookline, MA, USA","url":"http:\/\/www.kdnuggets.com\/","description":"KDnuggets Editor, Analytics, Big Data, Data Mining, and Data Science expert, KDD & SIGKDD co-founder, part-time philosopher, dad","protected":false,"followers_count":15328,"friends_count":344,"listed_count":1031,"created_at":"Thu Feb 05 17:37:26 +0000 2009","favourites_count":93,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":12274,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"0099B9","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050609482\/c32d3d654da4eb7c0518e7bba2609522.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050609482\/c32d3d654da4eb7c0518e7bba2609522.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/1174228552\/gpsc2_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/1174228552\/gpsc2_normal.jpg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/20167623\/1367620090","profile_link_color":"0099B9","profile_sidebar_border_color":"5ED4DC","profile_sidebar_fill_color":"95E8EC","profile_text_color":"3C3940","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":5,"favorite_count":3,"entities":{"hashtags":[],"symbols":[],"urls":}],"user_mentions":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":}]},"favorited":false,"retweeted":false,"filter_level":"medium","lang":"en"}
1 REPLY
Community Manager

Re: Using and insert Json format in Neo4j

I would suggest you to read each row as a string from the csv file with tFileInputDelimited, and then extract the value from any of a node of the json type of data with tExtractJsonField such as "PS" from the name node, load these values to Neo4j. The job design is read as below:
tFileInputDelimited--main--tExtractJsonField--main--tNeo4jOutput
Refer to the component manual tExtractJsonField.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business