개요
자산 가져오기는 외부 데이터를 자산으로 가져와서 에셋 오브젝트 유형, 오브젝트, 속성 및 레퍼런스로 자동 변환하는 방법입니다.
현재 CSV, JSON, 자산 검색 및 외부 소스에서 데이터를 가져올 수 있으며 Cloud 와 Data Center 의 가져오기 기능은 서로 다릅니다.
목표
다음과 같은 인프라 스트럭처를 자산으로 관리하고 각 서비스들간의 의존성을 설정합니다.
데이타 준비
가져올 데이타를 준비합니다. CSV 를 사용하는 경우 다음과 같은 사항에 주의해야 합니다.
다음과 같은 encoding 을 사용할 수 있으나 UTF-8 이 기본 설정이며 권장합니다.
(UTF-8 (default), UTF-16, ISO-8859-1, ISO-8859-15, Windows-1250, Windows 1252)CSV 파일의 첫 라인은 반드시 header 컬럼으로 해줘야 import 시 데이터를 매핑할 수 있습니다.
기본 구분자는 , 이지만 import 구조생성시 구분자를 지정할 수 있습니다.
여러 개의 값을 하나의 필드에 매핑할 경우 연결자로 || 를 사용하는 것을 권장합니다.
Google Sheets 에서 CSV 로 자료를 임포트하려면 URL 을 맨 뒷 부분의
/edit#gid=0
를 삭제하고/export?format=csv
를 추가합니다.
데이터 가져오기
Object schema 에 들어가서 “가져오기 만들기”를 클릭합니다.
Object schema 에 들어가서 “가져오기 만들기”를 클릭합니다.
CSV 를 선택합니다.
“웹 주소” 를 선택하고 URL 맨 뒷 부분의
/edit#gid=0
를 삭제하고/export?format=csv
를 추가합니다.”매핑 편집” 을 누르고 CSV 의 소스 필드와 Assets 의 Attribute 를 매핑해 줍니다.
매핑이 완료되면 “데이터 가져오기” 를 클릭합니다.
Web 주소 변경
data mapping
Map your data. There are two options:
Map your data automatically by automatically creating object types and attributes, or;
Map your data manually by:
Using object type mapping to create Assets object types
Using object type attribute mapping to create Assets attributes and references
Using child object type mapping to create hierarchical parent and child structures.
After you have created your object type mappings you must enable them. The import structure will not be executable until all object type mappings are set to ENABLED. If your object type mappings are not enabled, right-click on your object type mapping and click Enable to enable them.
See also
실습
google sheet 에 자산 정보 파일을 만들고 import 해 봅니다. (링크: https://docs.google.com/spreadsheets/d/1Idqb280GxmDAwx3gSPsn5I9ySRMrbQ1NfL-O0F88j_o/edit?usp=sharing )