GitHub Copilot로 의미 모델 앱 생성

이 레시피를 사용해 GitHub Copilot 에이전트 모드로 의미론 모델에 연결된 분석 앱을 만듭니다. Copilot는 데이터 앱 템플릿을 스캐폴드로 만들고, Fabric 의미 모델 커넥터를 추가하며, DAX 쿼리와 시각화를 생성하고, 앱을 검증합니다.

데이터 앱 템플릿은 Fabric 인증, DAX 생성 안내, 시각적 구성 요소, 브라우저 검증을 제공합니다. 커넥터는 Fabric Apps 클라이언트를 통해 위임된 의미 모델 접근을 제공합니다. 자세한 내용은 의미 체계 모델에 연결된 앱 만들기를 참조하세요.

이 자습서에서는 다음을 수행합니다.

  • GitHub Copilot을 에이전트 기반 개발에 준비하세요.
  • Copilot에 데이터 앱 템플릿을 생성해 달라고 요청하세요.
  • 앱을 의미론적 모델에 연결하세요.
  • 인터랙티브 영업 성과 탐색기를 구축하세요.
  • 생성된 변경 사항을 검토하고 검증하세요.
  • 앱을 Fabric에 배포하세요.
  • 배포를 확인하고 앱을 열어보세요.

사전 요구 사항

  • Node.js 20 이상.
  • Visual Studio Code.
  • Visual Studio Code에서 GitHub Copilot을 에이전트 모드 사용 가능합니다.
  • GitHub Copilot 대한 액세스 권한이 있는 GitHub 계정입니다.
  • Fabric에 액세스할 수 있는 Microsoft 계정
  • 참가자, 구성원 또는 관리자 권한이 있는 Fabric 작업 영역입니다.
  • 테넌트에 대해 Fabric Apps 워크로드가 활성화되어 있습니다.
  • 의미 체계 모델 실행 쿼리 REST API 테넌트 설정이 활성화되었습니다.
  • Fabric 또는 Power BI 용량에 호스팅된 의미 모델에 권한을 구축하고 읽습니다.
  • 시맨틱 모델의 작업 공간 ID와 항목 ID.

메모

Copilot은 터미널 명령을 실행하기 전에 승인을 요청합니다. 또한 Rayfin CLI가 요청할 때 인터랙티브 브라우저 로그인을 완료해야 합니다.

GitHub Copilot 에이전트 모드를 열기

  1. Visual Studio 코드를 엽니다.
  2. Copilot이 프로젝트를 생성하도록 원하는 상위 폴더를 열어보세요.
  3. 채팅을 엽니다.
  4. 에이전트 모드를 선택합니다.
  5. 상담원이 터미널과 작업 공간에 접근할 수 있는지 확인하세요.

Copilot이 검사하거나 수정하지 않길 원하지 않는 관련 파일이 있는 폴더는 열지 마세요.

데이터 앱 스캐폴드

다음 프롬프트를 Copilot Chat에 복사하세요:

Set up a new Fabric data app for me, end to end.

Create the project in a folder named sales-insights. Before changing code, read any
copilot-instructions.md files and agent guidance included in the scaffolded project.

Do the work yourself instead of only printing instructions:
1. Run `npm create @microsoft/rayfin@latest -- "sales-insights" --template dataapp --workspace <workspace-name>`.
2. In the scaffolded project, run `npx rayfin connector add --type fabric-semanticmodel --workspace-id <workspace-id> --item-id <semantic-model-item-id> --name salesModel --operations executeQuery`.
3. Run the version-matched npm install command printed by the connector command.
4. Open and inspect the scaffolded project. Explain the data app template's DAX query,
   visualization, data grid, theme, and browser-validation patterns.
5. Configure the template to use ConnectorsRayfinClient, the generated salesModel
   schema, and the fabricSemanticModel() runtime. Don't retain or add a direct
   Execute Queries REST API client.
6. If authentication is required, run `npx rayfin login` and pause while I complete
   sign-in.
7. Run the existing build and report any errors.
8. Summarize the scaffolded app and wait for my semantic model requirements.

Ask before making a destructive change or using a force option.

<workspace-id>, <semantic-model-item-id> 및 <workspace-name>를 Fabric 작업 영역 및 의미 체계 모델의 값으로 바꾸세요. Copilot이 명령을 실행할 때 이를 승인하고, 메시지가 표시되면 Rayfin 로그인 절차를 완료하세요.

Copilot에게 질문하기에게 앱 개발을 요청하세요

앱의 대상, 질문, 상호작용, 시각화 등을 설명하세요. 커넥터는 salesModel 이미 의미 모델을 식별합니다.

다음 프롬프트를 영업 성과 탐색기의 시작 레시피로 사용하세요. 비즈니스 요구사항을 모델 내 필드에 맞게 조정하세요.

Use the existing salesModel connector to build a sales performance explorer for
sales managers.

Requirements:
- Inspect the generated connector schema and semantic model metadata before editing.
  Use actual table, measure, and column names instead of guessing them.
- Show KPI callouts for the model's revenue, order volume, and margin measures when
  those measures are available.
- Add a time-series chart for sales performance, a bar chart that compares a useful
  business category, and a detailed data grid.
- Add date and category filters, and use the template's cross-highlighting behavior.
- Use the template's DAX generation patterns and visual primitives. Minimize the
  number of DAX queries and don't duplicate queries for the same data.
- Submit DAX with client.connectors.salesModel.executeQuery(), check the returned
  status, and handle success and error results.
- Apply the semantic model's format strings consistently to cards, charts, tooltips,
  and the data grid.
- Include loading, empty, and error states.
- Don't add mock data, embed credentials, or implement a separate authentication flow.
- Preserve the template's Fabric authentication and the semantic model connector.
- Don't add dependencies unless they're necessary.

Before editing, inspect the relevant files and give me a short implementation plan.
Ask me to clarify any model fields that are ambiguous. Then make the changes, run
the existing build, and use the template's browser validation workflow to check the
layout at desktop and mobile sizes. Explain any errors you fix.

프로젝트를 수정하기 전에 Copilot의 계획을 검토하세요. 계획이 요구사항에 맞지 않는다면, 실행 승인 전에 채팅에서 수정하세요.

생성된 변경 내용 검토

Copilot이 작업을 마친 후에는 작업 검토를 요청하세요:

Review the changes you made against every requirement in my previous prompt.

Check for:
- DAX queries that reference fields that aren't in the semantic model.
- Duplicate or unnecessary DAX queries.
- Hard-coded sample data, credentials, access tokens, or a second sign-in flow.
- Formatting that ignores the semantic model's format strings.
- Charts, filters, cross-highlighting, or data grid interactions that don't work.
- Missing loading, empty, or error states.
- TypeScript or build errors.

Fix confirmed issues, run the existing build and browser validation, and summarize
the final behavior.

Visual Studio Code에서 소스 컨트롤 diff를 점검해 보세요. 다음 사항에 특히 주의하세요.

  • salesModel 커넥터 구성, 생성된 스키마 및 DAX 쿼리.
  • rayfin/rayfin.yml의 서비스 구성.
  • package.json의 새로운 종속성.
  • 인증 변경이나 커넥터를 우회하는 직접 REST 호출.
  • 절대 커밋해서는 안 되는 비밀이나 자격 증명.

의미 모델 연결을 배포하고 검증합니다

Copilot에게 질문하기에게 앱 배포와 연결 확인을 요청하세요:

Deploy the app with `npx rayfin up`, then run `npx rayfin up status` and confirm
that the deployment is healthy. Give me the Fabric portal link from the command
output.

Don't add mock data if a semantic model query fails. Check the workspace and model
IDs in the connector configuration, the Semantic Model Execute Queries REST API
tenant setting, my Build and Read permissions, the DAX query, the connector error
result, and the browser console. Report the exact failure and the corrective action.

Fabric 포털에서 앱을 열어 실시간 의미 모델 쿼리를 테스트하세요.

앱 유효성 검사

Copilot에게 질문하기에게 프로젝트의 기존 검증 작업을 맡기세요:

Validate the app without adding new tools.

1. Run the existing build and type-check commands from package.json.
2. Run the template's browser validation at desktop and mobile sizes.
3. Check for clipped charts, unreadable labels, empty visuals, and console errors.
4. Tell me which semantic model queries and user interactions I must verify in the
    Fabric portal.
5. Fix confirmed build, type, or layout errors, and rerun the failed check.

Fabric 포털에서 Copilot에게 준 승인 기준을 확인하세요. 인증, 필터, 교차 강조, 데이터 포맷, 빈 상태, 오류 처리, 그리고 각 시각적 결과에 대해 테스트합니다.

완성된 앱을 배포하세요

변경 사항을 검토하고 앱을 테스트한 후, Copilot에게 배포를 요청하세요:

Deploy the reviewed app to Fabric.

1. Show me the current git diff and summarize what will be deployed.
2. Run `npx rayfin up`.
3. Run `npx rayfin up status`.
4. Confirm that the deployment is healthy.
5. Give me the hosted app URL and Fabric portal link from the command output.

Stop and explain the issue if deployment or verification fails.

같은 npx rayfin up 명령어가 앱 개발을 계속할 때 기존 배포를 업데이트합니다.

Copilot으로 계속 반복하세요

나중에 변경할 때는 집중된 프롬프트를 사용하세요. 원하는 동작, 영향을 받는 사용자, 제약 조건, 검증 단계를 포함하세요.

Add a product detail view to the sales performance explorer.

Open the view when a user selects a product in the data grid. Use fields and measures
that exist in the semantic model, reuse existing query results where practical, and
preserve filters and formatting. Run the existing build and browser validation, then
list the interactions and DAX results I should verify in the Fabric portal.

각 요청은 검토할 수 있을 만큼 작게 유지하세요. Copilot에게 크거나 잠재적으로 파괴적인 변경을 요청하기 전에 작업 상태를 정하세요.

Copilot 워크플로우 문제 해결

Copilot은 명령어만 출력합니다

Copilot에게 명령어를 직접 실행하고 결과를 보고하라고 하세요. 채팅이 에이전트 모드이고 터미널 접근이 활성화되어 있는지 확인하세요.

명령어가 로그인 대기 중입니다

브라우저 로그인 과정을 완료하세요. 그다음 Copilot에게 로그인이 완료되었다고 알려서 계속 진행할 수 있게 하세요.

Copilot이 잘못된 폴더를 편집합니다

에이전트를 멈추고, Visual Studio Code에서 스캐폴드 프로젝트 폴더를 열고, 그 워크스페이스에서 새 채팅을 시작하세요.

배포는 성공하지만 의미 모델 쿼리는 실패합니다

Copilot에게 질문하기에게 커넥터의 작업 공간과 모델 ID, Semantic Model Execute Queries REST API 테넌트 설정, 빌드 및 읽기 권한, 생성된 DAX, 커넥터 오류 결과, 그리고 브라우저 콘솔을 확인해 달라고 요청하세요. 실패한 쿼리를 모의 데이터로 대체하지 마세요.

Copilot이 제안한다--force

Copilot에게 먼저 잠재적으로 파괴적인 스키마 연산을 보여주도록 요구하세요. 데이터 손실 가능성을 이해하고 승인할 때만 수락하세요 --force .

다른 문제에 대해서는 Fabric 앱 문제 해결을 참조하세요.