# Discourse Data Explorer와 Power BI 통합

**URL:** https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577
**Category:** Administrators
**Tags:** tutorial, platforms
**Created:** [8월 2, 2020, 12:44오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577 "2020-08-02T12:44:18Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![loginerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loginerror/32/156605_2.png) [@loginerror](https://meta.discourse.org/u/loginerror)
#### Post date: [8월 2, 2020, 12:44오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/1 "2020-08-02T12:44:19Z")

</div>

# Discourse [Data Explorer](https://meta.discourse.org/t/32566?silent=true) Power BI 통합

최근 저는 [Data Explorer](https://meta.discourse.org/t/32566?silent=true) 데이터를 최소한의 오버헤드로 Power BI에 직접 가져오는 멋진 Power BI 함수를 만들었습니다.

따라서 저처럼 Power BI 앱을 통해 데이터를 자동으로 가져오고 새로고침되기를 원하신다면, 아래는 Power BI의 고급 편집기(Advanced Editor)에 입력해야 할 함수 코드입니다:

```plaintext
(queryID) => let
        resultCount = 1000,
        otherNameForPage = 0,

        GetPage = (otherNameForPage) =>
            let
                content1 = "params={""page"":""" & Number.ToText(otherNameForPage) & """}",
                RawData = Json.Document(Web.Contents(
                    "https://forumURL/admin/plugins/explorer/queries",
                    [RelativePath=Number.ToText(queryID) & "/run",
                        Query=
                        [
                            params="{""page"":""" & Number.ToText(otherNameForPage) & """}"
                        ],

                        Headers = [ 
                        #"api-username"="yourAPIUsername",
                        #"api-key"="yourAPIKey",
                        #"Content-Type" = "application/x-www-form-urlencoded"],
                        Content = Text.ToBinary(content1)
                    ]
                    
                ) ),
                resultCount = RawData[result_count]
            in
                if RawData[result_count] = 0 then null else RawData,
            Pages = List.Generate(
                () => [i = 0, RawData = GetPage(i)],
                each [RawData] <> null,
                each [i=[i]+1, RawData = GetPage(i)],
                each Table.Combine(let raw = [RawData] in List.Transform(raw[rows], each Table.FromRows({_}, raw[columns])))),
            Output = Table.Combine(Pages)
in
    Output

```

그리고 여기 **[Data Explorer](https://meta.discourse.org/t/32566?silent=true) 쿼리 예시**가 있습니다. 위의 함수가 올바르게 작동하려면 **필요한** 페이지네이션(pagination)을 포함하고 있습니다 (쿼리가 단 1페이지만 반환하더라도 필요합니다):

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

SELECT count(*) from badges

OFFSET :page * 1000
LIMIT 1000

```

(위 예시의 첫 번째와 마지막 두 줄을 포함함으로써 기존 쿼리를 쉽게 수정할 수 있습니다)

이 함수는 더 이상 결과가 없도록 페이지를 자동으로 반복합니다.

# 작동하는 방법?

함수를 Power BI에 로드한 후, 두 가지를 설정해야 합니다:

1. api-username과 api-key (위 함수의 플레이스홀더 참조):

2. 쿼리 ID 번호.

# 출력 예시

이것은 샘플 쿼리의 출력입니다:

![image](https://global.discourse-cdn.com/meta/original/3X/6/a/6a4da395ce76d220a02f14a7dc9d81d52daf8565.png)

이것으로 끝입니다! 이제 원하는 대로 데이터를 변환할 수 있습니다.

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [8월 2, 2020, 12:47오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/2 "2020-08-02T12:47:18Z")

</div>

여유가 너무 많으셨네요. 😆

그래도 감사합니다. 🙂 정말 유용했어요.

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [8월 2, 2020, 1:33오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/3 "2020-08-02T13:33:26Z")

</div>

나처럼 Power BI를 보고 혼란스러워하는 사람들을 위해.

[https://powerbi.microsoft.com/en-us/what-is-power-bi/](https://powerbi.microsoft.com/en-us/what-is-power-bi/)

---

<div class="post-metadata">

### Author: ![Konrad\_Sopala](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/konrad_sopala/32/167014_2.png) [@Konrad\_Sopala](https://meta.discourse.org/u/Konrad_Sopala)
#### Post date: [8월 6, 2020, 11:42오전 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/4 "2020-08-06T11:42:36Z")

</div>

@loginerror 님, 알려주셔서 감사합니다! Tableau에서도 같은 결과를 얻어보려 합니다. Power BI에서 제공하는 것과 비슷한 고급 편집기가 있는지 확실하지는 않지만, 확인해 보겠습니다.

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [8월 6, 2020, 12:08오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/5 "2020-08-06T12:08:25Z")

</div>

나처럼 Tableau에 대해 잘 모르는 분들을 위해.

[https://www.tableau.com/](https://www.tableau.com/)

> 비즈니스의 내외부를 아우르는 전체적인 그림을 파악하세요.  
> 공공 보건 상태, 경제 지표, 정부 정책과 같은 중요한 외부 소스와 모든 데이터를 연결하세요.

* * *

[위키백과](https://en.wikipedia.org/wiki/Tableau_Software)에서 발췌

> Tableau 제품은 [관계형 데이터베이스](https://en.wikipedia.org/wiki/Relational_database), [온라인 분석 처리(OLAP) 큐브](https://en.wikipedia.org/wiki/OLAP_cube), [클라우드 데이터베이스](https://en.wikipedia.org/wiki/Cloud_database), [스프레드시트](https://en.wikipedia.org/wiki/Spreadsheet)를 쿼리하여 그래프 형태의 데이터 시각화를 생성합니다. 이 제품들은 또한 인메모리 데이터 엔진에서 데이터를 추출, 저장 및 검색할 수도 있습니다.

---

<div class="post-metadata">

### Author: ![BorislavHr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/borislavhr/32/173411_2.png) [@BorislavHr](https://meta.discourse.org/u/BorislavHr)
#### Post date: [8월 28, 2020, 8:47오전 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/6 "2020-08-28T08:47:26Z")

</div>

hey @loginerror 이걸 공유해 주셔서 감사합니다!

PowerBI를 막 시작하는 중인데, Discourse 대시보드를 만드는 프로젝트가 재미있을 것 같네요. 덕분에 초기 단계를 진행할 수 있을 것 같고, 재미있는 부분에 더 빨리 도달할 수 있을 것 같습니다.

하지만 이걸 위해 한 가지 질문이 있습니다…  
새로 생성한 API 키(제 사용자 이름으로)를 사용하여 제안된 쿼리를 실행해 보았지만, 어떤 이유로든 작동하지 않습니다.

Discourse에서는 무언가 진행 중인 것으로 보입니다. API 키가 사용되었음을 표시하지만, PowerBI는 쿼리를 끝없이 실행만 하고 데이터를 제공하지 않습니다.

저는 쿼리에 전혀 능숙하지 않아서, 분명히 뻔한 것을 놓치고 있는 것 같습니다… 도움을 주실 수 있을까요?

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/6/067fd043c893bec45144fd10ef67fb14cee38b72.png)

---

<div class="post-metadata">

### Author: ![loginerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loginerror/32/156605_2.png) [@loginerror](https://meta.discourse.org/u/loginerror)
#### Post date: [8월 28, 2020, 3:25오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/7 "2020-08-28T15:25:50Z")

</div>

플러그인을 꽂기만 하면 당연히 작동해야 합니다.

하나의 값만 반환하는 샘플 쿼리를 실행해 보셨나요?

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

SELECT count(*) from badges

OFFSET :page * 1000
LIMIT 1000

```

그렇지 않다면, 페이지 수가 더 많은 경우(페이지당 1,000개 레코드로 제한됨) 모든 데이터를 로드하는 데 더 시간이 걸릴 수 있습니다.

원래 게시글의 코드를 사용하여 Power BI 프로젝트를 빠르게 만들어 코드를 테스트해 봤고, 정상적으로 실행되는 것을 확인했습니다(시스템 API 키 또는 관리자 권한이 있는 사용자 키 모두에서 정상적으로 실행되는 것으로 보입니다).

---

<div class="post-metadata">

### Author: ![BorislavHr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/borislavhr/32/173411_2.png) [@BorislavHr](https://meta.discourse.org/u/BorislavHr)
#### Post date: [8월 31, 2020, 6:23오전 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/8 "2020-08-31T06:23:38Z")

</div>

아, 그렇게 빨리 답변해 주실 줄 몰랐네요. 감사합니다!  
완전 초보자처럼 보일 수 있는데, 아마도 실제로 초보자라서 그런 것 같습니다. 그런데 이 코드 조각을 어디에 사용해야 하나요? 죄송하지만, Power BI를 정말 처음 사용해 보는 입장이어서요..

---

<div class="post-metadata">

### Author: ![loginerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loginerror/32/156605_2.png) [@loginerror](https://meta.discourse.org/u/loginerror)
#### Post date: [8월 31, 2020, 6:40오전 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/9 "2020-08-31T06:40:19Z")

</div>

이것은 [Data Explorer](https://meta.discourse.org/t/32566?silent=true) 플러그인에 저장해야 하는 샘플 [Data Explorer](https://meta.discourse.org/t/32566?silent=true) 쿼리입니다. 이 쿼리는 레코드 1개만 반환하도록 설계되어, 대량의 데이터를 다운로드하지 않고도 함수를 테스트할 수 있습니다.

이후 URL에서 해당 ID를 가져와 첫 번째 게시물의 코드로 생성된 Power BI 함수에 입력하세요:

```plaintext
/admin/plugins/explorer?id=260

```

---

<div class="post-metadata">

### Author: ![BorislavHr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/borislavhr/32/173411_2.png) [@BorislavHr](https://meta.discourse.org/u/BorislavHr)
#### Post date: [8월 31, 2020, 7:01오전 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/10 "2020-08-31T07:01:19Z")

</div>

아, 이제 알겠어요! 정말 감사합니다. 저는 Power BI 관점에서만 보고 있었네요.. 어리석었죠 🙂

앞으로 어떻게 될지 지켜보겠습니다.

다시 한번 감사합니다. 정말 좋습니다.

---

<div class="post-metadata">

### Author: ![loginerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loginerror/32/156605_2.png) [@loginerror](https://meta.discourse.org/u/loginerror)
#### Post date: [3월 11, 2021, 8:27오전 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/11 "2021-03-11T08:27:32Z")

</div>

첫 번째 게시글의 스크립트를 개선하려는 분이 계실 수 있으니 간단한 업데이트를 공유합니다.

사실 데이터 양과 무관하게 한 번에 모든 데이터를 가져오는 것이 가능한 것 같습니다. 😅  
(상당한 크기의 `posts` 테이블(id 및 raw 컬럼 포함)에서 스트레스 테스트를 해보았는데 성공적이었습니다!)

샘플 쿼리:

```plaintext
SELECT 'id'
            || string_agg(E'\n' || case when posts.id::text is null then '-1' else posts.id::text end
            ,''
            ORDER BY posts.id asc) as value
FROM posts

```

이 쿼리를 실행하면 거의 CSV 형식의 파일이 하나의 값으로, 즉 한 페이지에 출력됩니다. 이때 `value"` 부분과 끝의 `"`을 제거하면 유용한 CSV 파일이 됩니다.

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/a/8a37c69ec8fba54be7499a5f30530edf1213ce35.png)

물론 CSV 파일에 새로운 컬럼을 추가하고 해당 컬럼에 대한 데이터를 추가함으로써 더 많은 데이터를 포함시킬 수 있습니다:

```plaintext
SELECT 'id,newcolumn'
            || string_agg(E'\n' || case when posts.id::text is null then '-1' else posts.id::text end
            || string_agg(E'\n' || case when posts.newcolumn::text is null then '-1' else posts.newcolumn::text end
            ,''
            ORDER BY posts.id asc) as value
FROM posts

```

이러한 쿼리를 지원하도록 업데이트하면 Power BI가 여러 페이지를 탐색할 필요가 없어져 데이터 검색 속도가 빨라집니다.

---

<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: [6월 4, 2021, 2:48오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/12 "2021-06-04T14:48:13Z")

</div>

안녕하세요! Power BI는 비교적 최근에 접했고, Discourse [Data Explorer](https://meta.discourse.org/t/32566?silent=true)는 아주 처음 사용해 보는데요. 좀 이해해 주시면 좋겠습니다.

연결을 시도하고 있는데, 상단의 스크립트에 포럼 URL, 사용자 이름, 비밀번호를 입력했습니다. [Data Explorer](https://meta.discourse.org/t/32566?silent=true)에서 테스트 배지 스크립트를 실행해 보았지만, Power BI에서 연결을 시도하면 다음과 같은 오류가 발생합니다:

 ![Screenshot 2021-06-04 104520](https://global.discourse-cdn.com/meta/original/3X/2/5/255a8493aa00b62ae37fa40d1bd38c4351944e67.png)

Power BI에서 다른 권한을 시도하면 데이터는 익명으로 수집되어야 한다고 나오기 때문에 익명으로 연결하고 있습니다.

어떤 팁이 있을까요?

결국 수백 개에 달하는 우리 포럼 전체를 Power BI에 연결하여 분석을 하고 싶습니다. 이렇게 수동으로 하는 것보다 더 쉬운 방법이 있다면 그것도 알려주시면 감사하겠습니다!

수정: 모든 데이터를 가져오는 업데이트된 쿼리에 대해 약간 혼란스럽습니다. 먼저 CSV로 내보내야 하나요? 이것은 라이브 링크가 아닌가요?

---

<div class="post-metadata">

### Author: ![loginerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loginerror/32/156605_2.png) [@loginerror](https://meta.discourse.org/u/loginerror)
#### Post date: [6월 4, 2021, 3:17오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/13 "2021-06-04T15:17:10Z")

</div>

> [@dinoscool3](#):
>
> 내 사용자 이름과 비밀번호

포럼 사용자 자격 증명이 아니라, 관리 → API에서 가져올 수 있는 API 키를 사용해야 합니다.

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/c/6ca8196ae525a73a73f6e7e63a3df29d3cc0f79c.png)

> [@dinoscool3](#):
>
> 수정: 모든 데이터를 가져오는 업데이트된 쿼리에 대해 조금 혼란스럽습니다. 먼저 CSV로 내보내야 하나요? 이것은 실시간 링크가 아닌가요?

기본적으로 많은 양의 데이터를 한 번에 가져오기 위한 거대한 우회 방법이기 때문에, 원래 방식을 이해하기 전에 이 방법으로 시작하지 않는 것이 좋습니다.

---

<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: [6월 4, 2021, 3:30오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/14 "2021-06-04T15:30:07Z")

</div>

맞아요!

왜 'password’라고 쳤는지 나도 모르겠네요. 'API 키’를 뜻했고, 생각도 API 키로 하고 있었어요. 그 단계를 거쳐서 키를 가져와서 말씀하신 PowerBI 스크립트의 해당 부분에 입력했습니다.

---

<div class="post-metadata">

### Author: ![loginerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loginerror/32/156605_2.png) [@loginerror](https://meta.discourse.org/u/loginerror)
#### Post date: [6월 4, 2021, 8:59오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/15 "2021-06-04T20:59:37Z")

</div>

우선 Postman을 사용해 API 호출이 정상적으로 이루어지는지 확인해 보세요.

API 호출 자체는 브라우저에서 데이터 탐색기 쿼리 페이지로 이동한 후, 네트워크 콘솔을 열고 쿼리를 실행하면 찾을 수 있습니다. XHR 필터를 사용하면 Postman에서 모든 것이 정상인지 확인하기 위해 사용할 수 있는 모든 필수 매개변수가 표시됩니다.

---

<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: [6월 7, 2021, 6:22오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/16 "2021-06-07T18:22:51Z")

</div>

결국 Power BI에 오타가 있어서 문제가 발생했던 거였어요. 제가 바보였네요! 이제 Power BI에서 정상적으로 작동하고 있으니, 데이터를 전부 또는 일부 가져와서 검토를 시작하는 과정을 진행해야 합니다.

---

<div class="post-metadata">

### Author: ![mattyoung](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattyoung/32/170562_2.png) [@mattyoung](https://meta.discourse.org/u/mattyoung)
#### Post date: [10월 11, 2021, 9:50오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/17 "2021-10-11T21:50:43Z")

</div>

@loginerror - 제가 뭔가 간단한 걸 놓치고 있는 건 아닌지 궁금합니다. (PowerBI는 아주 초보이지만 Excel 기반 대시보딩은 조금 해본 적 있습니다)…

계속해서 인증 정보(credents) 관련 문제가 발생합니다. 인증 정보는 정상적인 걸로 알고 있습니다. Postman으로 확인해 보았거든요. 쿼리에서 매개변수 이름 주변의 #나 "을 어떻게든 제거해야 하는지 궁금합니다. (시도해 봤지만 수많은 구문 오류가 발생했습니다.)

쿼리 아이콘이 위 예시와 약간 다르게 보이지만, 모든 것이 제대로 로드되고 있다고 생각합니다.

 ![1_Discourse_Invoked_Function](https://global.discourse-cdn.com/meta/original/3X/f/8/f81e1210bf4209c66cd940531e700a0e3a1b8e91.png)  
 ![2_Discourse_Enter_Params](https://global.discourse-cdn.com/meta/original/3X/2/7/27eabfafb5f3b903062aa8fc88c55d6022901d2c.png)  
 ![3_Discourse_PowerBI_Function](https://global.discourse-cdn.com/meta/original/3X/6/d/6d58ee00ec812fe98e6b1d2f979cccf2132f8a6b.png)

수동으로 인증 정보를 입력하려고 하면 (PowerBI가) 이름 입력란에 이름을 입력하라고 계속 알려주는데, 그 입력란은 제공되지 않는 경우가 많습니다 ;). 어쨌든 위 예시에는 그런 부분이 나오지 않으므로, 이게 잘못된 사용 방식인 것 같습니다.

네트워크 어딘가에서 차단되고 있는 것일 수도 있지만, 먼저 간단한 오류를 배제하고 싶었습니다. 여기에서 잘못된 부분이 있는지 확인해 주시고, 어떻게 생각하시는지 알려주세요. 감사합니다.

---

<div class="post-metadata">

### Author: ![loginerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loginerror/32/156605_2.png) [@loginerror](https://meta.discourse.org/u/loginerror)
#### Post date: [10월 12, 2021, 7:02오전 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/18 "2021-10-12T07:02:20Z")

</div>

@mattyoung 님, 안녕하세요.

Power BI의 경우 익명 자격 증명을 사용해야 합니다. 이는 API 키가 이미 함수에 하드코딩되어 있기 때문입니다.

---

<div class="post-metadata">

### Author: ![mattyoung](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattyoung/32/170562_2.png) [@mattyoung](https://meta.discourse.org/u/mattyoung)
#### Post date: [10월 12, 2021, 6:15오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/19 "2021-10-12T18:15:13Z")

</div>

드디어 제공해 주신 샘플 쿼리와 새로운 API 키, 그리고 해당 API 키에 연결된 단일 사용자를 사용하여 작동하게 만들었습니다.

제가 범했던 실수 몇 가지와 제가 명확하게 이해하지 못했던 혼란스러운 부분들을 나열해 보겠습니다… 이 내용들이 다른 분들에게도 도움이 될 수 있으며, 실제로 제 환경에서 작동하는 단계들이 무엇인지도 알려드리겠습니다:

Discourse에서는 실제로 API를 생성해야 했는데, “All Users” API가 아닌 “Single User” API를 사용하고 실제 사용자명을 지정해야 했습니다.

PowerBI의 경우, PowerBI에 진입할 때 쿼리 시스템을 사용하려면 Power Query 영역으로 들어가기 위해 "Transform Data(데이터 변환)"를 선택해야 합니다. New Source \> Blank Query(새 소스 \> 빈 쿼리)를 선택하세요. 그런 다음 fx 옆의 새 필드에 커서가 표시되면, 상단 버튼 줄에서 "Advanced Editor(고급 편집기)"를 선택하여 이 토픽 상단에 제시된 큰 쿼리를 이미 Discourse 사용자명과 API 키로 치환한 상태로 붙여넣으세요. Done(완료)을 선택합니다. 그러면 Discourse 쿼리 ID 번호를 입력하라는 필드가 나타납니다. 번호를 입력한 후 Invoke(실행)를 누르세요.

인증 방식을 어떻게 지정할 것인지 묻는 초기 경고가 표시됩니다:

 ![4_howtoconnect](https://global.discourse-cdn.com/meta/original/3X/9/3/930da54fc95d09bcc14f3043e08e4a668c7b3668.png)

Edit Credentials(자격 증명 편집)를 선택하세요.

 ![5](https://global.discourse-cdn.com/meta/original/3X/f/f/ffad2b0af0975ad3654ae0efc80e1d03cf2032bd.png)

이것이 “Anonymous(익명)” 연결로 표시되는 것을 볼 수 있는데, 이것이 우리가 원하는 것입니다. URL은 그대로 두세요(서브디렉토리가 나열되지 않은 단일 URL인 경우에만). 이전에 저는 쿼리에 나열된 전체 URL을 입력하고 있었습니다. 분명히 제 생각에 너무 복잡하게 접근한 것이었고 큰 실수였습니다. 😉

아래와 유사한 출력이 생성되는 것을 볼 수 있으며, 이 기본 쿼리가 이제 작동하고 있음을 알 수 있습니다!

 ![Screen Shot 2021-10-12 at 11.13.28 AM](https://global.discourse-cdn.com/meta/original/3X/3/6/365cd3641a780fe9d437c04535a6505be06e4617.png)

---

<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: [10월 27, 2021, 6:32오후 UTC](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577/20 "2021-10-27T18:32:14Z")

</div>

안녕하세요! 또 왔습니다!

원래 데이터를 가져오는 방식을 이해했습니다. 여러 뷰를 성공적으로 만들고 Power BI에 가져왔습니다. 좋아요!

하지만 이제 속도 문제에 부딪혔습니다. 예를 들어 Select \* from user\_visits/users/topics 등처럼 원시 데이터만 가져오려고 합니다. 또한 포럼도 여러 개 있습니다. 현재 약 15개 포럼으로 테스트 중인데, User Visits의 경우 새로 고침 시간이 너무 길어졌습니다. 예를 들어 현재 새로 고침이 1시간 넘게 진행 중입니다. 최종적으로는 수백 개의 포럼에서 데이터를 가져와야 하므로, 장기적으로 이 방식은 작동하지 않을 것입니다.

하지만 제안해 주신 우회 방식은 정말 막막합니다. 수정을 시도해 봤지만 작동하지 않았습니다(주로 SQL 쿼리를 작성하는 데 능숙하지 않아서요). Select \* From User\_visits를 더 빠르게 수행할 수 있도록 우회 방식을 수정해 주실 수 있을까요?

[다음 페이지](https://meta.discourse.org/t/discourse-data-explorer-power-bi-integration/159577.md?page=2)
