UNIT 5: Joins, Features and Techniques
5-1. Joiner Transformation
1. Designer
1) Source Analyzer
Sources - Import from File
comma 구분, Transaction Date 필드 Datetime 으로 변환
Import from Database - TDBU07 접속 - STG_PRODUCT 가져오기
2) Target Designer
Target - Import from Database - TDBU07 접속 - STG_TRANSACTION 가져오기
3) Mapping Designer
Mappings - Create - m_STG_TRANSACTIONS_07
sales_transaction 가져오기
STG_PRODUCT 가져오기
STG_TRANSACTION 가져오기
4) Joiner
SQ_sales_transaction 는 모든 컬럼 링크
SQ_STG_PRODUCT 는 PRODUCT_ID, PRODUCT_COST 컬럼만 링크
우측버튼 Rename - jnr_Sales_Transaction_To_STG_PRODUCT
Port tab 선택 후
PRODUCT_ID 는 output 체크 해제, IN_ 붙이기
Condition tab 선택 후
Add a new condition
Master - IN_PRODUCT_ID
Detail - PRODUCT
확인
아래와 같이 Target 에 링크
CUST_NO J CUST_ID
PRODUCT J PRODUCT_ID
DEALERSHIP J DEALERSHIP_ID
PAYMENT_DESC J PAYMENT_DESC
PROMO_ID J PROMO_ID
DATE_ID J DATE_ID
TRANSACTION DATE J TRANSACTION_DATE
TRANSACTION_ID J TRANSACTION_ID
EMPLOYEE_ID J EMPLOYEE_ID
TIME_KEY J TIME_KEY
SELLING PRICE J SELLING_PRICE
PRODUCT_COST J UNIT_COST
DELIVERY CHARGES J DELIVERY_CHARGES
QUANTITY J SALES_QTY
DISCOUNT J DISCOUNT
HOLDBACK J HOLDBACK
REBATE J REBATE
저장
2. workflow manager
Workflows - Create - wkf_STG_TRANSACTION_07
session 아이콘 클릭
m_STG_TRANSACTIONS_07 선택
Start 부터 링크
Edit m_STG_TRANSACTIONS_07
Mapping 탭
Sources
SQ_sales_transactions -
source filetype - Direct
Source file directory
Source file name - sales_transactions.txt
SQ_STG_PRODUCT - Connections - TDBU07
Targets
STG_TRANSACTIONS
Connections - TDBU07
Properties - Truncate target table option - check
저장 후 start workflow
3. workflow monitor