데이터 자산 가져오기 속성

데이터 자산 가져오기 노드 아이콘 데이터 자산 가져오기 노드를 사용하면 연결을 통해 원격 데이터 소스나 로컬 컴퓨터에서 데이터를 가져올 수 있습니다.

import json

stream = modeler.script.stream()

dataassetimport = stream.findByID("<import nodeId>")
# loads the string settings as a json object
userSettings = json.loads(dataassetimport.getPropertyValue("user_settings"))

userSettings["interactionProperties"]["sheet_name"] = "<new sheet name>"
dataassetimport.setPropertyValue("user_settings", json.dumps(userSettings))
표 1. dataassetimport 특성
특성 이름 데이터 유형 특성 설명
asset_type DataAsset
Connection
데이터 유형을 지정하십시오: DataAsset 또는 Connection.
asset_id 문자열 asset_type 에 대해 자산 ID( DataAsset )가 설정되어 있는 경우, 이것이 자산의 ID입니다.
asset_name 문자열 asset_type 에 자산 이름( DataAsset )이 설정되어 있을 때, 이것이 자산의 이름입니다.
connection_id 문자열 asset_type 에 대해 ' Connection '가 설정되어 있을 때, 이것은 연결의 ID입니다.
connection_name 문자열 asset_type 에 대해 Connection 가 설정되어 있을 때, 이것이 연결의 이름입니다.
connection_path 문자열 asset_type 에 대해 Connection 가 설정되어 있을 때, 이것이 연결 경로입니다.
user_settings 문자열 연결에 대한 상호작용 속성을 포함하는 JSON 문자열이 빠져나갔습니다. 이용 가능한 인터랙션 포인트에 대한 자세한 내용은 IBM 으로 문의해 주시기 바랍니다.

예:

"{\"interactionProperties\":
{\"file_format\":\"csv\",\"encoding\":\"UTF-
8\",\"first_line_header\":true,\"infer_schema\":true,\"infer_record_co
unt\":1000,\"infer_as_varchar\":false,\"invalid_data_handling\":\"fail
\",\"file_name\":\"input.csv\"}}"

이 값은 사용 중인 연결 유형에 따라 변경됩니다.