logInfo()
|
에이전트 프로세스 로그에 정보 메시지를 로깅합니다. 이 항목은 Oracle Enterprise Performance Management Cloud 작업 로그인 EPM_APP_DATA_HOME\logs 폴더의 프로세스 로그에 로깅되지만 로컬 epmagent.log에는 로깅되지 않습니다. 로그 항목은 INFO 로그 레벨에 생성됩니다.
|
agentAPI.logInfo("SAMPLE: INFO log message from script")
|
logError()
|
에이전트 프로세스 로그에 오류 메시지를 로깅합니다. 이 항목은 EPM Cloud 작업 로그인 EPM_APP_DATA_HOME\logs 폴더의 프로세스 로그에 로깅되며 epmagent.log에도 로깅됩니다. 로그 항목은 SEVER 로그 레벨에 생성됩니다.
|
agentAPI.logError("SAMPLE: SEVER log message from script")
|
setBindVariables()
|
setBindVariables() 메소드를 사용하여 추출 쿼리의 바인드 변수를 업데이트합니다. befExtract 스크립트에만 적용할 수 있습니다.
바인드 변수는 NAME 변수인 키와 VALUE 가 포함된 각 변수의 Java 맵 항목으로 전달되어야 합니다.
|
newBindVar = dict({'PERIOD':'Feb-05', 'LEDGER':'Vision Operations (USA)'})
jmap = java.util.HashMap()
newBindVar.keys(): jmap[key] = newBindVar[key] 에 있는 키의 경우
agentAPI.setBindVariables(jmap)
|
getBindVariables()
|
getBindVariables() 메소드를 사용하여 추출 쿼리의 바인드 변수를 가져옵니다. 각 바인드 변수는 NAME 및 VALUE 키를 사용하여 바인드 변수를 정의하는 맵에 저장됩니다.
|
bindVariables = agentAPI.getBindVariables()
bindVariables.entrySet(): print entry.key, entry.value 에 있는 항목의 경우
|
updateQuery()
|
updateQuery() 메소드를 사용하여 추출 쿼리를 업데이트합니다. befExtract 스크립트에만 적용할 수 있습니다.
|
agentAPI.updateQuery("SELECT * FROM TDATASEG")
|
getQuery()
|
getQuery() 메소드를 사용하여 추출 실행 호출 중에 EPM Cloud에서 EPM Integration Agent로 전달된 쿼리를 가져옵니다.
|
print "Printing Query: " + agentAPI.getQuery()
|
skipAction()
|
EPM Integration Agent에서 사용자정의 추출 루틴을 사용하는 경우 skipAction() 메소드를 사용하여 데이터 추출 단계를 건너뜁니다.
befExtract 스크립트 중에만 추출 실행을 건너뛸 수 있습니다.
저장된 쿼리를 실행하는 대신 EPM Cloud로 업로드할 데이터 파일을 제공하려는 경우, 이름이 <process ID>.dat 인 파일을 EPM Cloud로 업로드하기 위해 적시에 MyData/data 폴더에 저장해야 합니다. 즉, befExtract , aftExtract 또는 befUpload 스크립트에서 파일을 이 폴더에 저장해야 합니다.
|
agentAPI.skipAction('true')
|
getConnectionDetails()
|
getConnectionDetails() 메소드를 사용하여 추출 실행 호출 중에 EPM Cloud에서 EPM Integration Agent로 전달된 클라우드에서 연결 인증서 데이터 객체를 가져옵니다.
|
cred = agentAPI.getConnectionDetails()
url = cred.getJDBCUrl()
user = cred.getUserName()
password = cred.getPassword()
agentAPI.logInfo ("Connection Details: ")
agentAPI.logInfo("URL: " + url)
agentAPI.logInfo('User: ' + user)
|
setCustomConnection(conn)
|
setCustomConnection(conn) 메소드를 사용하여 추출 실행 호출 중에 EPM Integration Agent에 대해 생성된 사용자정의 연결을 설정합니다. 에이전트는 이 연결을 사용하여 실행합니다. conn 객체는 유형 4 JDBC 연결이어야 하며 java.sql.Connection 인터페이스를 구현해야 합니다.
befExtract 및 befExport 스크립트에만 적용할 수 있습니다. 자세한 사용 방법은 BefExtract.py 와 Java CustomEventSample 및 CustomWribackEvent 샘플 스크립트를 참조하십시오.
|
Oracle 데이터베이스에 대한 사용자정의 연결을 생성하려면 다음을 수행합니다.
java.lang.Class.forName("oracle.jdbc.driver.OracleDriver")
conn = java.sql.DriverManager.getConnection('jdbc:oracle:thin:@<host>:<port>:<sid>', '<user/schema name>', '<password>')
agentAPI.setCustomConnection(conn)
|