Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
skill-step-labs
/
llm-rag-data-platform-lab
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
main
Breadcrumbs
llm-rag-data-platform-lab
/
1_data_platform_client.py
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
38 lines (32 loc) · 2.58 KB
main
Breadcrumbs
llm-rag-data-platform-lab
/
1_data_platform_client.py
Copy path
Top
File metadata and controls
Code
Blame
38 lines (32 loc) · 2.58 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
try:
import snowflake.connector
import pandas as pd
except ImportError:
pass
class SnowflakeDataClient:
"""
[Senior 면접용 딥다이브: Data Platform & 엔터프라이즈 데이터 처리]
Q1. "Snowflake에서 대용량 데이터를 LLM용으로 가져올 때 성능 최적화는 어떻게 하나요?"
A1: "단순히 `SELECT *`로 가져오면 메모리 오버플로우가 발생합니다.
실무에서는 Arrow 데이터 포맷이나 Parquet 포맷 기반으로 직렬화(Serialization) 오버헤드를 줄이는
'fetch_pandas_all()' 또는 'fetch_arrow_all()' 메서드를 사용하여 청크 단위로 가져옵니다.
또한, 최신 모던 데이터 스택에서는 데이터 이동 자체를 없애기 위해 Snowflake 내부의
'Snowpark Container Services'나 'Cortex'를 활용해 데이터가 있는 곳에서 직접 임베딩 모델을 띄우는 아키텍처를 지향합니다."
Q2. "개인정보(PII)가 포함된 사내 문서를 RAG로 쓸 때 보안 처리는?"
A2: "데이터 플랫폼 단에서 Snowflake의 'Dynamic Data Masking'이나 'Row-level Security'를 적용하여
LLM 파이프라인에 애초에 마스킹된(예: 주민번호 -> ***) 데이터만 추출되도록 원천 차단해야 합니다."
"""
def __init__(self):
self.user = os.environ.get("SNOWFLAKE_USER", "mock_user")
self.password = os.environ.get("SNOWFLAKE_PASSWORD", "mock_password")
self.account = os.environ.get("SNOWFLAKE_ACCOUNT", "mock_account")
def fetch_company_policies(self) -> list:
print("[Data Platform] Snowflake 엔터프라이즈 DW 접속 및 파케이(Parquet) 기반 고속 추출 시뮬레이션...")
print("[Data Platform] PII(개인정보) 마스킹 정책이 적용된 안전한 텍스트 데이터 추출 성공.")
mock_data = [
"사내 보안 규정: 직원은 모든 클라우드 리소스 접근 시 반드시 MFA(다중 인증)를 거쳐야 합니다. AWS 콘솔 접근은 사내 VPN 환경에서만 허용됩니다.",
"휴가 및 연차 규정: 기본 연차는 1년에 15일 부여되며, 사용하지 않은 연차는 다음 해 3월까지 이월하여 사용할 수 있습니다. 반차는 0.5일로 계산됩니다.",
"법인카드 사용 규정: 식대 지원은 1인당 1식 15,000원으로 제한되며, 밤 10시 이후 야근 시 택시비 지원 한도는 월 30만 원입니다. 증빙 영수증은 경비 시스템에 스캔하여 첨부해야 합니다."
]
return mock_data
You can’t perform that action at this time.