mongodump: Import clickstream data into a mongodb

Description Usage Arguments Details Author(s) See Also Examples

View source: R/mongodump.R

Description

This function imports session-based JSON clickstream files into a mongodb database.

Usage

1
2
mongodump(path_to_clickstream, database = "moocs", create_index = TRUE,
  index_value = "username", verbose = FALSE, jsonArray = FALSE, ...)

Arguments

path_to_clickstream

Path to compressed archive with clickstream file

database

database in which to store the collection of clickstream data (collection will be defined as course name)

create_index

Mongo can create an index on usernames, which speeds up queries considerably. Defaults to TRUE

index_value

Which value will mongodb use for indexing?

verbose

Print verbose intermediate messages? Defaults to FALSE

jsonArray

Use the –jsonArray flag while importing documents to mongo. This treats the input as a jsonArray (see https://docs.mongodb.org/manual/reference/program/mongoimport/)

...

any other arguments needed to connect to mongodb (e.g. username, password, host)

Details

This function requires a running mongodb database (see: https://www.mongodb.org/)

Author(s)

Jasper Ginn

See Also

sqldump

Examples

1
2
3
4
5
6
## Not run: 
# Dump clickstream file into mongo
mongodump("/home/jasper/Documents/MOOC-DATA/Data_Dumps/configuringworld-001/configuringworld-001_clickstream_export.gz",
verbose = TRUE)

## End(Not run)

LU-C4i/R-package-MOOCs documentation built on May 7, 2019, 12:38 p.m.