snowflake
-
Snowflake 사용 후기, 장/단점 -경험카테고리 없음 2023. 4. 1. 01:47
회사에서 한 2달 정도? Snowflake를 활용해 봤는데, 두서 없지만 기억나는데로 장.단점을 적어보고자 합니다. [장점] 컴퓨팅 리소스 분리 - snowflake에서는 warehouse라고 하는데, 기존 RDB처럼 서버위에서 전체가 있는 것이 아니라 쿼리를 실행하는 컴퓨팅과, 데이터를 저장하는 storage가 나뉘어져 있습니다. 또한 UserRole별로 다양하게 warehouse를 분배하여 한 명이 과도하게 사용한다고 해도 다른 User가 영향받지 않도록 할 수 있습니다. 해당 기능을 팀별로 나눠 제공하면 팀별로 서로 영향도 주지 않을 뿐더러, 비용 등도 따로 확인할 수 있습니다. (Snowflake는 사용시 warehouse가 실행되고 실행된 시간 등에 따라 요금이 부과됨). 유연한 RBAC설계 -..
-
Snowflake RBAC 기본구조프로그래밍/Snowflake 2023. 3. 31. 01:25
Snwoflake는 기본적인 User별 다양한 RBAC설계를 할 수 있는데 기본적으로 다음과 같은 구조를 가지고 있습니다. - AccountAdmin : 가장 상위 레벨의 권한을 가진 User로 하위에 있는 모든 역할을 할 수 있습니다. 해당 권한은 2-4명 이내로 가지고 있는 것이 적절하다고 보여집니다. 특별한 설정 없이 해당 계정으로 Object들을 생성하면 다른 하위 권한의 User들은 함부로 내용을 확인할 수 없습니다. 특별한 권한 정리가 안된다면, Snowflake의 Integration등은 AccountAdmin에서만 생성할 수 있습니다. * Integration등이 생성이 되어야 stage등을 만들어 S3등과 연동할 수 있습니다. ** Owner를 변경하여 Sysadmin에서 해당 권한을 가..
-
Snowflake Time Travel프로그래밍/Snowflake 2023. 3. 30. 00:11
Snowflake에는 Time Travel이란 기능이 있습니다. 특정 시점으로 데이터를 돌려주는 것인데요. 에디션에 따라 다르지만 최대 7일까지인 것으로 알고 있습니다. 데이터를 적재하다가 특정 이슈로 다시 ETL 프로세스를 실행시켜 데이터를 넣어야 하는 상황에서 이미 적재된 데이터를 되돌리기 좋은 기능인 것 같습니다. 혹은 실수로 데이터를 없앤 경우도 사용할 수 있죠. 물론 권한에 따라서 삭제할 일은 많이 없을 수 있지만..유용한 기능인 것 같습니다. [사용법] - time travel 사용 select * from (TIMESTAMP => 'Mon, 27 March 2023 00:00:00 +0900'::timestamp_tz); 이런 방법으로 특정 시점의 테이블 데이터를 호출할 수 있습니다. - 테..