PowerBI and Native JSON Processing

PowerBI is one of the great new reporting environments you can use to visualize data. One great advantage of PowerBI is its native JSON support and built-in programmable transformation engine. Power-BI can simply directly talk to Couchbase Server and report on the data. ODBC 또는 JDBC 드라이버가 필요하지 않습니다!

Visualize data in Couchbase Server v4 in 4 Steps

Lets walk through the 4 steps to get your Couchbase Server data visualized in PowerBI:

#1 샘플 데이터를 가져옵니다:

Couchbase Server 4와 함께 제공되는 여행 샘플 버킷을 사용하고 있습니다. 관리자 콘솔의 "설정" 탭을 사용하거나 설치 중에 이 데이터 집합을 설치합니다. 예제와 함께 따라할 수 있습니다.

#2 N1QL REST API를 통해 쿼리합니다:

샘플로 매우 간단한 쿼리를 사용하겠습니다: 이 쿼리는 각 목적지 공항으로 가는 총 항공편이 포함된 모든 항공사의 전체 목록을 반환합니다.

To connect PowerBI with N1QL. We will use the N1QL REST API to execute the query. Some may not know this but N1QL comes with a REST API that takes in an ad-hoc statement. N1QL REST API is documented 여기 로 설정하면 원하는 JSON 인식 도구를 사용하여 이 API를 직접 호출할 수 있습니다. 제가 선택한 도구는 우편 배달원 (크롬 마켓플레이스에서도 사용 가능). 포스트맨과 결합된 N1QL REST API는 유선을 통해 전송되는 내용을 완벽하게 파악할 수 있게 해줍니다.

다음 그림에서는 위의 쿼리로 포트 8093의 로컬 클러스터 노드에 postman으로 접속하고 있습니다.

We will pass the encoded URL to Power BI and it looks like this:

#3 Submit & Transform Data in PowerBI:

Last, you need to fire up the desktop version of Power BI. Desktop version is free and is available 여기.

  • Goto “Get Data” menu and choose “Web” as the method. Enter in the URL above and wait for the data to show up.

  • 이제 일련의 변환을 통해 데이터를 시각화할 수 있도록 준비하겠습니다.
    1. Once the results are streamed into Power BI, you will see the JSON attributes that come back from N1QL. Drill into “results” by clicking the “List” link in the screen.

  1. We will use the table transform to shape our JSON. Click on “To Table” menu at the top and don’t specify a delimiter. Simply click “OK”.

  1. 다음으로, 단일 열 그리드의 열 상단에 있는 작은 '분할' 아이콘을 클릭하여 JSON의 속성을 테이블의 개별 열로 분할합니다.

  1. 확인을 클릭하면 완료된 데이터 변환의 모습은 다음과 같습니다... 왼쪽 상단의 '닫기 및 적용'을 클릭하기만 하면 됩니다.

#4 Visualize Data in PowerBI:

I like to use the TreeMap visualization for displaying the most popular destinations for each airline. To get there,

  1. Drag “Column1.destinationairport” under 그룹
  2. Drag “Column1.total_flights” to Values.
  3. Drag “Column1.name” to Page Level Filters and expand the field to filter on “Air Foyle”.

You will also modify the data type for total_flights. To get there, there are 2 more clicks. Follow the Green Plus on the figure below.

  1. Change the data type for column total_flights to “Whole Number”.
  2. Change the Aggregation on total_flights to “Sum”.

And you are done!.

I also want to mention that you can use ODBC/JDBC to connect to Couchbase Server data as well. Here is the link to download free 카우치베이스 서버용 ODBC 및 JDBC 드라이버.

However… What I am seeing in todays world is, majority of the new data that is generated and stored is in JSON. So The new data visualization platforms like PowerBI, are adding powerful support around JSON. PowerBI has done a great job making this super easy to work with data in Couchbase Server without and ODBC driver.

행복한 해킹.

씨한 비이코글루 - 제품 관리 이사

작성자

게시자 Cihan Biyikoglu, 제품 관리 이사, Couchbase

Cihan Biyikoglu는 Couchbase의 제품 관리 디렉터로, Couchbase Server 제품을 담당하고 있습니다. Cihan은 빅 데이터 애호가로서 20년 이상의 경험을 Redis Labs의 제품 팀에 제공하고 있습니다. Cihan은 C/C++ 개발자로 경력을 시작했습니다.

댓글 남기기