# Beginner’s Crash Course to Elastic Stack - Part 4: Aggregations | Issues with data

**URL:** <https://discuss.elastic.co/t/beginner-s-crash-course-to-elastic-stack-part-4-aggregations-issues-with-data/325902>\
**Category:** Elasticsearch\
**Created:** [February 19, 2023, 2:44am UTC](https://discuss.elastic.co/t/beginner-s-crash-course-to-elastic-stack-part-4-aggregations-issues-with-data/325902 "2023-02-19T02:44:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pathaniaamn](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@pathaniaamn](https://discuss.elastic.co/u/pathaniaamn)\
**Post date:** [February 19, 2023, 2:44am UTC](https://discuss.elastic.co/t/beginner-s-crash-course-to-elastic-stack-part-4-aggregations-issues-with-data/325902/1 "2023-02-19T02:44:22Z")

</div>

After importing the data.csv file and running the **STEP 1: Create a new index(ecommerce\_data) with the following mapping.**, I am getting an error:

{  
"error": {  
"root\_cause": [  
{  
"type": "resource\_already\_exists\_exception",  
"reason": "index [ecommerce\_data/if7D34vxR2W6IfuPPGyuKw] already exists",  
"index\_uuid": "if7D34vxR2W6IfuPPGyuKw",  
"index": "ecommerce\_data"  
}  
],  
"type": "resource\_already\_exists\_exception",  
"reason": "index [ecommerce\_data/if7D34vxR2W6IfuPPGyuKw] already exists",  
"index\_uuid": "if7D34vxR2W6IfuPPGyuKw",  
"index": "ecommerce\_data"  
},  
"status": 400  
}

Reference: [GitHub - LisaHJung/Part-4-Running-Aggregations-with-Elasticsearch-and-Kibana](https://github.com/LisaHJung/Part-4-Running-Aggregations-with-Elasticsearch-and-Kibana)

---

<div class="post-metadata">

**Author:** ![pathaniaamn](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@pathaniaamn](https://discuss.elastic.co/u/pathaniaamn)\
**Post date:** [February 19, 2023, 2:54am UTC](https://discuss.elastic.co/t/beginner-s-crash-course-to-elastic-stack-part-4-aggregations-issues-with-data/325902/2 "2023-02-19T02:54:08Z")

</div>

Please ignore this. When i imported the data, I named the index as " **ecommerce\_data**" and hence I got the error message "resource\_already\_exists\_exception"

Worth suggesting in Git repo to import the file and use a name for the index as "ecommerce\_orig"

Then, data cleanup would work seamlessly.

---

<div class="post-metadata">

**Author:** ![pathaniaamn](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@pathaniaamn](https://discuss.elastic.co/u/pathaniaamn)\
**Post date:** [February 19, 2023, 3:00am UTC](https://discuss.elastic.co/t/beginner-s-crash-course-to-elastic-stack-part-4-aggregations-issues-with-data/325902/3 "2023-02-19T03:00:08Z")

</div>

Suggested change for the Repo:

## Resources

[Table of Contents: Beginner's Crash Course to Elastic Stack](https://github.com/LisaHJung/Beginners-Crash-Course-to-the-Elastic-Stack-Series):

This workshop is a part of the Beginner's Crash Course to Elastic Stack series. Check out this table contents to access all the workshops in the series thus far. This table will continue to get updated as more workshops in the series are released!

[Free Elastic Cloud Trial](https://www.elastic.co/cloud/cloud-trial-overview/30-days?ultron=community-beginners-crash-course-May2022+&hulk=30d)

[Instructions](https://dev.to/lisahjung/beginner-s-guide-to-setting-up-elasticsearch-and-kibana-with-elastic-cloud-1joh) on how to access Elasticsearch and Kibana on Elastic Cloud

[Instructions](https://dev.to/elastic/downloading-elasticsearch-and-kibana-macos-linux-and-windows-1mmo) for downloading Elasticsearch and Kibana

[Video Recording](https://www.youtube.com/watch?v=iGKOdep1Iss) of the workshop

[Mini Beginner's Crash Course to Elasticsearch & Kibana playlist](https://ela.st/mini-beginners-crash-course)

Do you prefer learning by watching shorter videos? Check out this playlist to watch short clips of beginner's crash course full length workshops. Part 4 workshop is broken down into episodes 15-18. Season 2 clips will be uploaded here in the future!

[Presentation slides](https://github.com/LisaHJung/Part-4-Running-Aggregations-with-Elasticsearch-and-Kibana/blob/main/Part%204_%20Aggregations%20(3).pdf)

[E-commerce Dataset](https://www.kaggle.com/carrie1/ecommerce-data) from Kaggle. Please name the index as _ **"ecommerce\_original"** _

[What's next?](https://github.com/LisaHJung/Part-5-Understanding-Mapping-with-Elasticsearch-and-Kibana) Eager to continue your learning after mastering the concept from this workshop? Move on to Part 5: Understanding Mapping with Elasticsearch and Kibana [here](https://github.com/LisaHJung/Part-5-Understanding-Mapping-with-Elasticsearch-and-Kibana)!

Second change:

**STEP 2: Reindex the data from the original index(source) to the one you just created(destination).**

```auto
POST _reindex
{
  "source": {
    "index": " ***ecommerce_original***"
  },
  "dest": {
    "index": "ecommerce_data"
  }
}

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 20, 2023, 2:08am UTC](https://discuss.elastic.co/t/beginner-s-crash-course-to-elastic-stack-part-4-aggregations-issues-with-data/325902/4 "2023-02-20T02:08:20Z")

</div>

Thanks for the feedback, you would be best off reporting this in [Issues · LisaHJung/Beginners-Crash-Course-to-Elastic-Stack-Series-Table-of-Contents · GitHub](https://github.com/LisaHJung/Beginners-Crash-Course-to-Elastic-Stack-Series-Table-of-Contents/issues) to make sure Lisa sees it 🙂

---

<div class="post-metadata">

**Author:** ![pathaniaamn](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@pathaniaamn](https://discuss.elastic.co/u/pathaniaamn)\
**Post date:** [February 20, 2023, 3:13am UTC](https://discuss.elastic.co/t/beginner-s-crash-course-to-elastic-stack-part-4-aggregations-issues-with-data/325902/5 "2023-02-20T03:13:24Z")

</div>

@Lisa_Jung FYI. Just a thought to make this lab easier to follow.

Cheers

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 20, 2023, 3:13am UTC](https://discuss.elastic.co/t/beginner-s-crash-course-to-elastic-stack-part-4-aggregations-issues-with-data/325902/6 "2023-03-20T03:13:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
