Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Lake for Enterprises

You're reading from  Data Lake for Enterprises

Product type Book
Published in May 2017
Publisher Packt
ISBN-13 9781787281349
Pages 596 pages
Edition 1st Edition
Languages
Authors (3):
Vivek Mishra Vivek Mishra
Profile icon Vivek Mishra
Tomcy John Tomcy John
Profile icon Tomcy John
Pankaj Misra Pankaj Misra
Profile icon Pankaj Misra
View More author details

Table of Contents (23) Chapters

Title Page
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
Part 1 - Overview
Part 2 - Technical Building blocks of Data Lake
Part 3 - Bringing It All Together
Introduction to Data Comprehensive Concepts of a Data Lake Lambda Architecture as a Pattern for Data Lake Applied Lambda for Data Lake Data Acquisition of Batch Data using Apache Sqoop Data Acquisition of Stream Data using Apache Flume Messaging Layer using Apache Kafka Data Processing using Apache Flink Data Store Using Apache Hadoop Indexed Data Store using Elasticsearch Data Lake Components Working Together Data Lake Use Case Suggestions

Indexing Documents


Now that we have the index created, we can indexed a document into the index. The only requirement for a document to be indexed is that it should be a JSON document as Elasticsearch is schema-less and derives the storage schema based on the document structure indexed.

As shown in the following figure, the command to index a document is PUT {index-name}/{type}/{id}:

PUT datalake/contacts/101
{
  "id":101,
  "cell":"(478) 531-2026",
  "work":”1-906-774-1226",
  "email":"vincenzo.hickle@yahoo.com"
}

Figure 24: Document Creation Query

As the document is indexed, Elasticsearch internally creates document mapping based on the data in the initial document. This mapping can be accessed as shown here:

GET datalake/_mapping/contacts

Figure 25: Retrieving Document Mapping via Query

A few observations from the preceding screenshot:

  • Keyword analyzer is the default analyzer used for schema-less indexing
  • Based on the input type, the type information in the schema has been derived
  • Certain default...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}