Coder Social home page Coder Social logo

cooking-show's Introduction

MarkLogic Cooking Show

The MarkLogic Cooking Show is a tutorial designed to help learn developers learn MarkLogic. The tutorial starts by ingesting several data sets from the New York City Open Data Project via Apache NiFi. Once data is ingested, several queries will be executed in MarkLogic's Query Console. Setup for MarkLogic and Apache NiFi are facilitated using Docker.

Prerequisites

How do I set up?

  1. Clone this repository

  2. Create a MarkLogic Docker Image. See README under the Docker directory

  3. Edit the docker-compose file under the project root directory. Change the image for the "marklogic" service to the docker image created in the previous step.

  4. Start the set of containers. Make sure to wait about a minute for all these containers to initialize.

docker-compose up -d

If the docker containers fail to initialize, make sure to allocate more memory and CPU's to the docker daemon.

  1. Copy the following data sets into the data directory.

What docker containers are running?

MarkLogic

Apache NiFi

Apache NiFi is used to batch ingest data into MarkLogic.

Gradle

Gradle is a build tool that is used to initialize MarkLogic. There are three steps of initialization that are executed. The first step is to initialize MarkLogic including installing the security database and the admin user. The final step is to install a database called cooking-show-content and an app server called cooking-show.

Ingest NYC Data

  1. The Points of Interest data file is not valid JSON due to an extra carriage return on line 278826. Recommend running this JSON file through a JSON Lint program.

  2. Open up Apache NiFi.

  3. Import the template

./nifi/templates/Ingest_GeoJSON.xml
  1. Instantiate the template that was imported on the previous step.

  2. Open up the configuration of the PutMarkLogic processor (there should be the WARNING sign on this processor).

  3. Select the properties tab. Under the DatabaseClient Service, click on the arrow pointing to the right.

  4. Click on the settings for the first row (the gear icon)

  5. Click on the properties tab, set the password to "admin" and hit apply.

  6. Enable the connection by clicking on the lightning bolt icon.

  7. Select all the processors and press the Play button from the Operate panel. This starts up the data flow.

  8. Copy the four geojson data files from ./data to ./nifi/staging

Query the Data

  1. Open up Query Console.
  2. Select the cooking-show-content database from the drop down in the top left hand panel.
  3. Select the "Explore" button. There should be 20196 documents in the database.
  4. Import the workspace found under ./MarkLogic/Workspace.xml. The Workspace panel is in the top right panel.
  5. Review each of the queries starting from left to right.

How do I uninstall?

To remove these docker images execute the following command.

docker-compose down

The MarkLogic forest information is stored in a docker volume and will persist beyond the lifetime of your MarkLogic docker container.

cooking-show's People

Watchers

 avatar  avatar

cooking-show's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.