MSc 8122013

Stuart Hayes

8/12/13

 

MSc Project

 

Aim: Load the JSON files AEC provided.

REMEMBER – Must start the Mongo (Shell) first. And that a DBPATH needs to be created file:///C:/data/db/

Located in C:\MongoDB\bin\mongo.exe mongod.exe (mongos.exe is for sharding)

There doesn’t seem to be a way to load data into MongoDB. There are ways for reading pre-existing collections.

Firstly, browse the JSON, to do so open in a Browser. Seems difficult(?) to open in Excel.

file:///C:/Users/shayes/My%20Documents/Dundee/Project/Datafiles/crawler-pages.Json

Looks OK. Lots of textual data.

 

file:///C:/Users/shayes/My%20Documents/Dundee/Project/Datafiles/crawler-sites.Json

Looks OK. 6 sites

 

Try to get into Pentaho to push in to MongoDB?

Use the Json input step

 

 

Are they really JSON files? Pentaho doesn’t see them as JSON files.

Note – ‘all files’ selected

 

Note JSON files selected – nothing visible?

 

 

 

 

 

Try native MongoImport instead. Hold that…

Cmd
Cd C:\mongoDB\bin

**NOTE YOU DO NOT RUN MONGOIMPORT FROM THE MONGO SHELL BUT FROM A COMMAND PROMPT**

mongoimport –db test –collecton andyc c;\data\1.json
I copied the data file to C:\data and renamed it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s