Use Cortex Code with Workday data

Use Cortex Code with Workday data (Workday 데이터와 Cortex Code 사용)

Cortex Code는 Snowflake Workspaces에 내장된 AI 코딩 어시스턴트예요. Workday LDQ notebook이 Workspace 안에서 실행되므로 Cortex Code를 사용해 쿼리 작성부터 결과 분석, 시각화 구축까지 Workday 데이터 작업을 가속화할 수 있어요.

출처: Snowflake Documentation

본문

Preview 기능 — 열림

모든 계정에서 사용할 수 있어요.

Note

Snowflake용 Workday Live Data Query는 Workday에서는 Early Adopter(EA)이고 Snowflake에서는 Preview 상태예요. 접근을 요청하려면 Workday 계정 담당자에게 연락해요.

전제 조건

Cortex Code를 사용하려면 Workday LDQ 역할에 다음 데이터베이스 역할을 부여해요:

GRANT DATABASE ROLE SNOWFLAKE.COPILOT_USER TO ROLE WORKDAY_LDQ_TEST_ROLE;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER  TO ROLE WORKDAY_LDQ_TEST_ROLE;

Cortex Code 접근

Workspace 오른쪽 아래 모서리의 Cortex Code 아이콘을 클릭해요. 자연어 프롬프트를 입력할 수 있는 채팅 패널이 열려요.

예시 프롬프트

아래 프롬프트를 사용하기 전에 Workday 연결 및 Snowflake에서 데이터 쿼리를 완료해 작동하는 LDQ 연결을 설정해요.

Workday 데이터 탐색

"Write a Python cell that queries workday_core.public.worker for all active workers and loads the results into a pandas DataFrame called workers_df."

분석 및 시각화

"Using workers_df, create a bar chart showing headcount by management level, sorted descending."

"Summarize the workers_df DataFrame: show column types, null counts, and basic statistics."

변환 및 Snowflake 데이터와 조인

"Write code to save workers_df to a Snowflake table called WORKDAY_LDQ_TEST.LIVEDATA.WORKERS_SNAPSHOT, then join it with HR_DB.PUBLIC.DEPARTMENT_BUDGETS on department name."

디버그 및 설명

"Why is my LDQ query returning zero rows? Here is the error: …" (오류 메시지 붙여넣기)

(코드 셀 강조) "Explain what this code does."

데이터에 대한 예시 질문

Workday 데이터가 DataFrame으로 로드되면(예: Workday 연결 및 Snowflake에서 데이터 쿼리의 workers_df) 데이터 자체에 대해 Cortex Code에 질문할 수 있어요.

데이터 탐색

"What columns are in workers_df? Which ones look like they contain PII?"

"How many unique job titles are there? Show me the top 20 by headcount."

"Are there any workers with missing manager IDs?"

비즈니스 인사이트

"What’s the average tenure by department? Which department has the highest turnover?"

"Show me the distribution of workers hired in the last 12 months, broken down by quarter."

"Compare headcount across management levels. Are we top-heavy?"

데이터 품질

"Check workers_df for duplicate worker IDs."

"Which columns have more than 10% null values?"

"Find any rows where hire_date is in the future."

팁

  • Cortex Code는 notebook의 컨텍스트를 인식하고 기존 셀과 변수를 볼 수 있어요.
  • 데이터가 DataFrame으로 로드된 후에 가장 잘 동작해요. Workday LDQ 커넥터를 직접 호출할 수는 없지만, 실행할 Python 코드를 생성할 수 있어요.
  • 셀이 실패하면 결과 패널의 Fix 버튼을 사용해요. Cortex Code가 수정을 제안할 거예요.
  • 채팅에서 @를 입력해 프롬프트에 추가 컨텍스트로 Snowflake 테이블이나 뷰를 참조해요.

더 알아보기 (Learn more)