# 데이터 탐색 쿼리에 주제에 대한 직접 링크 추가

**URL:** https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914
**Category:** Data & reporting
**Tags:** data-explorer
**Created:** [8월 22, 2024, 3:48오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914 "2024-08-22T15:48:01Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![SStrong](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@SStrong](https://meta.discourse.org/u/SStrong)
#### Post date: [8월 22, 2024, 3:48오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/1 "2024-08-22T15:48:01Z")

</div>

현재 일부 자동화된 데이터 탐색기 스크립트가 시니어 이해관계자에게 전송되고 있습니다.

"이 항목에 대한 응답이 없으므로 누군가가 조치를 취해야 합니다."라는 내용이 담긴 새로운 토픽이 하나 등장하고 있습니다.

해당 토픽에 답변하기 위해 해당 토픽에 대한 직접 링크를 원합니다.

현재 데이터 탐색기에는 토픽 제목과 ID가 있어 검색은 가능하지만, 이러한 방식으로 토픽에 대한 직접 링크를 추가할 수 있는 방법이 있는지 궁금합니다.

감사합니다.

---

<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: [8월 22, 2024, 3:52오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/2 "2024-08-22T15:52:56Z")

</div>

[Allow topic links in reports to be clickable - #2 by JammyDodger](https://meta.discourse.org/t/allow-topic-links-in-reports-to-be-clickable/314438/2?u=moin%EC%97%90) 설명된 대로 URL을 생성할 수 있다고 생각합니다. 슬러그가 없다면, Discourse가 토픽 ID를 기반으로 하므로 예를 들어 "-"를 추가하면 됩니다.

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [8월 22, 2024, 3:53오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/3 "2024-08-22T15:53:48Z")

</div>

안녕하세요 @SStrong

필요한 컬럼을 `topic_id` 또는 `post_id`로 명명하면 링크를 가져올 수 있을 것 같습니다. 아래는 스크린샷입니다:

 ![This image shows a computer screen with a user interface that includes various elements such as a text editor, a query plan, and a console output. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/b/7/0/b70c2fd92e06aa1d494008448056d30592b62fc6.png)

---

<div class="post-metadata">

### Author: ![SStrong](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@SStrong](https://meta.discourse.org/u/SStrong)
#### Post date: [8월 22, 2024, 3:59오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/4 "2024-08-22T15:59:38Z")

</div>

왜 그리고 어떻게 작동하나요? 실제로는 작동하지만, 왜 그런지 조금은 혼란스럽습니다.

---

<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: [8월 22, 2024, 4:08오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/5 "2024-08-22T16:08:30Z")

</div>

데이터 탐색기에는 결과를 더 인터랙티브하게 만들어 주는 마법 별칭(magic aliases)이 여러 개 있습니다. 🪄 [Formatting Data Explorer Table Results](https://meta.discourse.org/t/formatting-data-explorer-table-results/277939)

이 중 많은 별칭은 어떤 테이블을 사용하느냐에 따라 자동으로 작동합니다. 예를 들어 `posts` 테이블에서 `topic_id`를 가져오면 해당 토픽으로 연결되는 인터랙티브 링크가 됩니다. 하지만 `topics` 테이블의 `id` 필드도 같은 효과를 내려면 별칭(`t.id AS topic_id`)을 추가해야 합니다. `users`와 `posts` 테이블도 마찬가지입니다.

> [@JammyDodger](#):
>
> ‘사이트 내’에서 보고서를 볼 때 토픽(또는 포스트 등) 테이블의 `id`를 별칭으로 지정하고 [data explorer](https://meta.discourse.org/t/32566?silent=true)의 마법을 이용해 이를 사용 가능한 링크로 변환할 수 있습니다:
> 
> ```plaintext
> SELECT 
> id AS topic_id
> FROM topics
> 
> ```

다만 결과를 내보내는 경우 이 별칭은 유지되지 않으며, 기본 id만 표시됩니다. 이를 해결하려면 moin이 제안한 대로 토픽 링크를 구성하고 이를 URL로 별칭을 지정하면 됩니다:

> [@JammyDodger](#):
>
> URL을 구성하고 `SOMETHING_url`로 별칭을 지정하여 하이퍼링크로 만들 수도 있습니다. 예시:
> 
> ```plaintext
> SELECT 
> 'https://meta.discourse.org/t/' || slug || '/' || id AS topic_url
> FROM topics
> 
> ```

---

<div class="post-metadata">

### Author: ![SStrong](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@SStrong](https://meta.discourse.org/u/SStrong)
#### Post date: [8월 23, 2024, 12:16오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/6 "2024-08-23T12:16:12Z")

</div>

감사합니다. 추가 문서는 나중에 자세히 읽어보겠습니다. 정말 감사합니다.

---

<div class="post-metadata">

### Author: ![SStrong](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@SStrong](https://meta.discourse.org/u/SStrong)
#### Post date: [8월 27, 2024, 12:44오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/7 "2024-08-27T12:44:13Z")

</div>

네, 이 기능은 데이터 탐색기에서는 100% 정상적으로 작동합니다. 하지만…

자동화 플러그인을 통해 자동 이메일을 받는 사용자는 데이터 탐색기 보고서를 직접 방문해야만 이 기능을 확인할 수 있습니다.

즉, 자동화 도구를 사용할 때 이메일 본문에 토픽 링크가 포함되지 않습니다. 이것이 정상적인 동작 방식인가요?

---

<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: [8월 27, 2024, 12:50오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/8 "2024-08-27T12:50:13Z")

</div>

예약된 데이터 탐색기 자동화의 경우 두 번째 방법을 사용하여 URL을 구성해야 할 것 같습니다.

---

<div class="post-metadata">

### Author: ![SStrong](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@SStrong](https://meta.discourse.org/u/SStrong)
#### Post date: [8월 28, 2024, 2:08오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/9 "2024-08-28T14:08:20Z")

</div>

감사합니다. 조금만 조정하니 잘 작동했습니다. 감사합니다 (개발자가 아니라 이런 내용들이 대부분 처음이라 질문이 많았습니다).

---

<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: [8월 28, 2024, 2:12오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/10 "2024-08-28T14:12:10Z")

</div>

괜찮아요. 🙂 여러분에게 궁금한 점이 있다면 다른 사람들도 같은 질문을 할 가능성이 높으니까, 모든 것이 지식의 산을 쌓는 데 도움이 됩니다. 📚

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [9월 27, 2024, 2:13오후 UTC](https://meta.discourse.org/t/adding-a-direct-link-to-a-topic-in-a-data-explorer-query/322914/11 "2024-09-27T14:13:00Z")

</div>

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