# Discourse Data Explorer Import no longer works?

**URL:** https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074
**Category:** Bug
**Tags:** data-explorer, sql-query
**Created:** [February 12, 2024, 2:23pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074 "2024-02-12T14:23:02Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![dinoscool3](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@dinoscool3](https://meta.discourse.org/u/dinoscool3)
#### Post date: [February 12, 2024, 2:23pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/1 "2024-02-12T14:23:02Z")

</div>

I’ve been trying to import some SQL queries from one discourse forum to another. Worked fine for the last few years. However, now when I try to import a query it allows me to select it and then nothing happens. Thoughts?

---

<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: [February 12, 2024, 2:33pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/2 "2024-02-12T14:33:51Z")

</div>

You’ll need to share more information like what the query was.

How are you trying to import them?

---

<div class="post-metadata">

### Author: ![dinoscool3](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@dinoscool3](https://meta.discourse.org/u/dinoscool3)
#### Post date: [February 12, 2024, 2:44pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/3 "2024-02-12T14:44:48Z")

</div>

This is an example for one of the queries:

```plaintext
--[params]
-- integer :page = 0

SELECT topic_views.*, single_sign_on_records.external_id, topics.title
from topic_views
left join single_sign_on_records
on topic_views.user_id = single_sign_on_records.user_id
left join topics
on topic_views.topic_id = topics.id
OFFSET :page * 1000
LIMIT ALL

```

I try to import it using the import button and selecting the file (attached)  
[topic-views.dcquery.json](https://meta.discourse.org/uploads/short-url/873qTo0ZTTxDhGerrmnWOaFOYrP.json) (605 Bytes)

Edit:

Using this button:

 ![Screenshot 2024-02-12 at 09.58.52](https://global.discourse-cdn.com/meta/original/4X/f/a/5/fa57e5cfdaf4ac6d7000bc9e9a3f48225f018f3c.png)

---

<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: [February 12, 2024, 3:03pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/4 "2024-02-12T15:03:38Z")

</div>

I hadn’t remembered that was a feature. When I try clicking import and selecting a file, nothing seems to happen.

---

<div class="post-metadata">

### Author: ![dinoscool3](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@dinoscool3](https://meta.discourse.org/u/dinoscool3)
#### Post date: [February 12, 2024, 3:16pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/5 "2024-02-12T15:16:31Z")

</div>

It worked fine up until about October, you could export the json file and import no problem. Now as you say, nothing happens. Its much quicker than copying and pasting because I have a large number of files.

---

<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: [February 12, 2024, 3:29pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/6 "2024-02-12T15:29:07Z")

</div>

You might move this to #Contribute > Bug

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 12, 2024, 4:07pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/7 "2024-02-12T16:07:32Z")

</div>

This is a side effect of this change (in `pick-files-button.js`):

[https://github.com/discourse/discourse/commit/b6f03fcecd919234ba29324a468659dd6d875778#diff-68454dfb6b4e0192a254e33f475bc878323ab80a08630d841b498880571a0cf8L94](https://github.com/discourse/discourse/commit/b6f03fcecd919234ba29324a468659dd6d875778#diff-68454dfb6b4e0192a254e33f475bc878323ab80a08630d841b498880571a0cf8L94)

By removing `this.onFilesPicked(files);`, you remove the action call defined here:

[https://github.com/discourse/discourse-data-explorer/blob/main/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs#L21](https://github.com/discourse/discourse-data-explorer/blob/main/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs#L21)

---

<div class="post-metadata">

### Author: ![dinoscool3](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@dinoscool3](https://meta.discourse.org/u/dinoscool3)
#### Post date: [February 12, 2024, 5:01pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/8 "2024-02-12T17:01:47Z")

</div>

So this was a change made by Discourse so there isn’t a way for me personally to fix?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 12, 2024, 6:05pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/9 "2024-02-12T18:05:56Z")

</div>

That’s right; it’s best to wait for a fix.

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [February 22, 2024, 9:47pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/11 "2024-02-22T21:47:19Z")

</div>

Thanks for reporting this! It should now be resolved 🎉

[https://github.com/discourse/discourse/pull/25819](https://github.com/discourse/discourse/pull/25819)

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [February 24, 2024, 4:00pm UTC](https://meta.discourse.org/t/discourse-data-explorer-import-no-longer-works/295074/13 "2024-02-24T16:00:25Z")

</div>

This topic was automatically closed after 42 hours. New replies are no longer allowed.
