# Howto/doc on 'data explorer'

**URL:** https://meta.discourse.org/t/howto-doc-on-data-explorer/281721
**Category:** Support
**Created:** [October 10, 2023, 7:28am UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721 "2023-10-10T07:28:21Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)
#### Post date: [October 10, 2023, 7:28am UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/1 "2023-10-10T07:28:21Z")

</div>

Hi guys.  
Would there be a doc/tutorial for non-webdev on _how to use data/queries/results_ in topics/posts? I searched but failed to find one. Thanks.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [October 10, 2023, 8:46am UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/2 "2023-10-10T08:46:38Z")

</div>

Did you find

> [@Data Explorer Tutorial - Part 1 - Writing Your First Query](https://meta.discourse.org/t/data-explorer-tutorial-part-1-writing-your-first-query/277925):
>
> discourse Want to extract some data from your Discourse site but not sure where to start? You’ve come to the right place! This is a #tutorial guide for beginners who are new to the [Data Explorer](https://meta.discourse.org/t/32566). If you’re already familiar with SQL and how to use the [Data Explorer](https://meta.discourse.org/t/32566), then you will most likely not need to read these topic, and may want to check out our #Data & reporting category instead. The goal of this guide is to help you get a basic grasp of how to use the [Data Explorer](https://meta.discourse.org/t/32566) to create reports …

Maybe the other topics with #sql-tutorial help you too.

---

<div class="post-metadata">

### Author: ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)
#### Post date: [October 10, 2023, 8:49am UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/3 "2023-10-10T08:49:19Z")

</div>

Thanks. I’ve thumbed through it - perhaps I’ve gone blind - but cannot see bits which would mention “incorporating” queries/results into a topic/post, into its content.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 10, 2023, 8:50am UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/4 "2023-10-10T08:50:54Z")

</div>

I don’t believe this is currently something you can do. There is an Automation that will send results to a PM or email. Perhaps you could check that out and see how it does it?

---

<div class="post-metadata">

### Author: ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)
#### Post date: [October 10, 2023, 8:59am UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/5 "2023-10-10T08:59:40Z")

</div>

How people do it then or how to understand when someone says “_.. manually created a new topic using the data from the Published Pages query above, then published it at `/pub/index.._” ?  
That is a quote from another topic about “indexing published pages”

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 10, 2023, 9:01am UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/6 "2023-10-10T09:01:21Z")

</div>

Copy and paste?

---

<div class="post-metadata">

### Author: ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)
#### Post date: [October 10, 2023, 9:02am UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/7 "2023-10-10T09:02:46Z")

</div>

> [@Page Publishing](https://meta.discourse.org/t/page-publishing/151971/164):
>
> Indexing Published Pages While we’re waiting for the [Index or search published pages](https://meta.discourse.org/t/index-or-search-published-pages/261301) feature, here is a way to do it manually. Finding Published Pages Using the [Discourse Data Explorer](https://meta.discourse.org/t/discourse-data-explorer/32566/1) you can create a new Published Pages query: SELECT CONCAT('/pub/', pp.slug) AS URL, pp.topic\_id FROM published\_pages pp ORDER BY pp.id Providing an Index Surely one can [Run Data Explorer queries with the Discourse API](https://meta.discourse.org/t/run-data-explorer-queries-with-the-discourse-api/120063) to create and maintain an index of published pages. This might even be doable with the [Custom …](https://meta.discourse.org/t/custom-wizard-plugin/73345)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 10, 2023, 12:53pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/8 "2023-10-10T12:53:01Z")

</div>

“manually created” for means that they created the topic normally and pasted in the stuff from the [data explorer](https://meta.discourse.org/t/32566?silent=true).

It might help if you say more about the specific problem that you are actually trying to solve.

---

<div class="post-metadata">

### Author: ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)
#### Post date: [October 10, 2023, 1:02pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/9 "2023-10-10T13:02:22Z")

</div>

Oh. I presumed that - since it looked like a “hot” topic to me - that proposed idea was a **solution** to have a _dynamic_ index of published pages. I thought that was the idea behind it - to have TOC/index for published pages, dynamic index.

---

<div class="post-metadata">

### Author: ![IrisBetty](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@IrisBetty](https://meta.discourse.org/u/IrisBetty)
#### Post date: [October 30, 2024, 7:20pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/10 "2024-10-30T19:20:25Z")

</div>

I am stuck. I’m trying to use the query to. create a new group and copy all existing members into that group.

I understand the part of getting to [data explorer](https://meta.discourse.org/t/32566?silent=true), naming it etc.

I’ve copied the query - now where to do I paste it? I’ve pasted it to the text box to the right of the Select area but nothing happens.

sorry for the elementary question but I’m on a time crunch to get this done.

tx

Bronwyn

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 30, 2024, 7:23pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/11 "2024-10-30T19:23:20Z")

</div>

> [@IrisBetty](#):
>
> I’m trying to use the query to. create a new group

[Data explorer](https://meta.discourse.org/t/32566?silent=true) is only for exploring data, not changing it.

If you need to change something with code, and don’t have access to run stuff in rails, then you need to use the API.

> [@IrisBetty](#):
>
> create a new group and copy all existing members into that group.

What problem is this solving? Do you really want to create a new group that has every user on the system on it? You can’t use `@everyone` or `@tl0`?

---

<div class="post-metadata">

### Author: ![IrisBetty](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@IrisBetty](https://meta.discourse.org/u/IrisBetty)
#### Post date: [October 30, 2024, 7:28pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/12 "2024-10-30T19:28:15Z")

</div>

Hi Jay:

There is a post on running a query that copies all users from certain groups into a new group.

I wasn’t to copy from the current Everyone into a new group.

Going forward, some of the Everyone group won’t be in the new group.

I found the post that showed this query:

–[params]  
– string\_list :group\_name  
– string\_list :new\_group\_names  
SELECT ue.email as “address@email”, :new\_group\_names as “new group”  
FROM users u  
INNER JOIN group\_users gu ON u.id = gu.user\_id  
INNER JOIN groups g on g.id = gu.group\_id  
INNER JOIN user\_emails ue on u.id = ue.user\_id  
WHERE g.name IN (:group\_name)  
AND ue.primary = true

I pasted that into the box to the right of the SELECT item. It said that two new input fields should appear at the bottom. But they haven’t.

Wondering what I have done wrong.

Bron

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 30, 2024, 7:32pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/13 "2024-10-30T19:32:15Z")

</div>

> [@IrisBetty](#):
>
> There is a post on running a query that copies all users from certain groups into a new group.

You **cannot** change data with the [data explorer](https://meta.discourse.org/t/32566?silent=true) plugin. I promise.

> [@IrisBetty](#):
>
> I want to copy from the current Everyone into a new group.

You’ll need to use the API (which will be hard unless you don’t have many users) or get the folks that are hosting you to do it from Rails.

---

<div class="post-metadata">

### Author: ![IrisBetty](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@IrisBetty](https://meta.discourse.org/u/IrisBetty)
#### Post date: [October 30, 2024, 7:54pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/14 "2024-10-30T19:54:45Z")

</div>

Got it, thanks. I thought I used the [data explorer](https://meta.discourse.org/t/32566?silent=true) to get the list and then I used that to upload to the group. I must have misunderstood. thanks for your quick advice. I’ll wait for Richard O to do it for me. Born

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 30, 2024, 7:56pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/15 "2024-10-30T19:56:59Z")

</div>

> [@IrisBetty](#):
>
> then I used that to upload to the group

OH! I missed that part. But I don’t know if there’s a way to upload a list for a group, except as an invite?

---

<div class="post-metadata">

### Author: ![IrisBetty](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@IrisBetty](https://meta.discourse.org/u/IrisBetty)
#### Post date: [October 30, 2024, 8:11pm UTC](https://meta.discourse.org/t/howto-doc-on-data-explorer/281721/16 "2024-10-30T20:11:48Z")

</div>

> [@Adding users from groups to other groups in bulk](https://meta.discourse.org/t/adding-users-from-groups-to-other-groups-in-bulk/260670):
>
> bookmark This guide explains how to add existing users from one or more groups to other groups using a combination of [Data Explorer](https://meta.discourse.org/t/32566?silent=true) and [bulk invites](https://meta.discourse.org/t/sending-bulk-user-invites/16468). person_raising_hand Required user level: Administrator Summary This guide will show you how to: Create a [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query to select users from specific groups Download the query results as a CSV file Use the bulk invite feature to add these users to new groups Requirements [Data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin installed Administrator access to you…

But if it doesn’t actually add them but sends an invitation then it is of no use and I think you are probably correct.

thanks again Jay.
