0% found this document useful (0 votes)
2K views4 pages

ODI Case Study

This document provides steps to delete files from a directory in Oracle Database based on a given number of days older. It loads the file list into a table, identifies files older than the given number of days, and deletes those files. It also updates the last modification date column in the table.

Uploaded by

Amit Sharma
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views4 pages

ODI Case Study

This document provides steps to delete files from a directory in Oracle Database based on a given number of days older. It loads the file list into a table, identifies files older than the given number of days, and deletes those files. It also updates the last modification date column in the table.

Uploaded by

Amit Sharma
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Oracle Data Integrator Case Study

Description:
BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginners G ide !or "racle "#I. The doc ment describes how to delete !iles !rom a director$ based on da$s older given thro gh the option. %oin o r pro!essional training program and learn !rom e&perts.

History:
Version 0.1 0.1 Description Change Initial Dra t 'e"ie()1 Author !oura" Atal#ar A*it Shar*a Publish Date 10th $an %01& 10th $an %01&

[Link] [Link] Page '

[Link]

www.h$periong r .com

+rite a procedure to delete iles ro* a directory based on days older gi"en through the Option.
Step: 1, C'-A.-/0I1-/1IS./.A21(ommand on Target)Technolog$) "racle *+n$ ,#B-S. Schema) + logical schema to e&ec te the command Ignore error) Tr e C'-A.- .A21- 345odi'e .getOb6ect7a*e8919: 90I1-S/1IS.9: 9+9,4; 80I1-/7A<- VA'CHA'8100,:DA.-/PA'. VA'CHA'8100,:CO7.-=. VA'CHA'8100,:DA>S/O1D-' 7?<-'IC810, 7?11, (ommand on So rce) - Empt$ Step: %, CO77-C./.O/D2 (ommand on Target)Technolog$) %$thon Schema) not applicable Ignore error) /alse I*port6a"a.s@l as SA1 I*port string base 5 odi'e .get$D2CConnection89S'C9, order 5 [Link]*ent8, (ommand on So rce) Empt$ Technolog$) "racle *Same as !irst step tech !or connecting to #atabase. Schema) + logical schema *Same as !irst step tech !or connecting to #atabase. Step: &, 1OAD/0I1-/1IS. (ommand on Target)Technolog$) %$thon Schema) not applicable Ignore error) /alse i*portos i*port n*atch )De inition de "ariables local/dir 5 B345odi'e .getSche*a7a*e890I1-/D+H/P?<9:9D9,4;Csa"eB list/re@ 5 DE re@ 5BB li*it/re@ 5 %00 nb/ro(s 5 0 nu*/sess/odi 5B345odi'e .getSession89S-SS/7O9,4; B target/table 5B345odi'e .getOb6ect7a*e8919: 90I1-S/1IS.9 : 9IA/D-CIS/S.!P?<9 : 9+9,4;B [Link] [Link] Page 0 [Link] www.h$periong r .com

conteFt 5B345odi'e .getConteFt89C.=/7a*e9,4;B ) Path and ile storage in a list ile1ist 5 D or in os.listdir8local/dir, i [Link] [Link].6oin8local/dir: ,,E ori ile in ile1ist: i 8 n*atch. n*atch8i ile: [Link]"9,,: nb/ro(s H5 1 i 8 n*atch. n*atch8i ile: 9GD0IJED0IJED0IJED0IJED0IJED0IJED0IJED0IJED0IJE [Link]"9,,: "ar/*as@ue 5 i ileD:I1KE "ar/dateti*e 5 i ileDI1L:IME else: "ar/*as@ue 5 i ileD:INE "ar/dateti*e 5 BB i re@55BB: re@ 5 9Insert Into 9 H target/table H 980I1-/7A<-:DA.-/PA'.:CO7.-=.:0I1-/PA.H, select B9 H i ile H 9B:B9 H "ar/dateti*e H 9B:B9 H conteFt H 9B:B9 H local/dir H 9B ro* du**y (hereB9H "ar/dateti*e H 9B3;BB9 else: re@ 5 re@ H 9 ?nion All select B9 H i ile H 9B:B9 H "ar/dateti*e H 9B:B9 H conteFt H 9B:B9 H local/dir H 9B ro* du**y (hereB9 H "ar/dateti*e H 9B3;BB9 i nb/ro(s 4 li*it/re@ 55 0: list/re@.append8re@, re@ 5BB i re@O5BB: list/re@.append8re@, orre@ in list/re@: order.eFecute8re@, )On *et a 6our le co*pteur de no*bre de lignesinsPrPes pour a ichagedanslBoperator ODI odi'e .set7bInsert8nb/ro(s, (ommand on So rce) Empt$ Step: N, ?PDA.-/0I1-S/1IS. (ommand on Target)Technolog$) "racle *Same as !irst step tech !or connecting to #atabase. Schema) + logical schema *Same as !irst step tech !or connecting to #atabase. Ignore error) /alse ?PDA.- 345odi'e .getOb6ect7a*e8919: 90I1-S/1IS.9: 9+9,4; S-. DA>S/O1D-'5CO7V-'.8DA.-:!-.DA.-8,:B>>>><<DDB,I CO7V-'.8DA.-:DA.-/PA'.:B>>>><<DDB, [Link] [Link] Page 1 [Link] www.h$periong r .com

(ommand on So rce) Empt$ Step: Q, D-1-.-/0I1-S (ommand on Target)Technolog$) S nopsis+PI*"#I +PI. Schema) not applicable Ignore error) /alse Odi0ileDelete 9IDI'5)0I1-/PA.H9 9I0I1-5)0I1-/7A<-9 9I'-C?'S-5>-S9 9I CAS-S-7S57O9 9I7O0I1-/-''O'57O9 (ommand on So rce) Technolog$) "racle *Same as !irst step tech !or connecting to #atabase. Schema) + logical schema *Same as !irst step tech !or connecting to #atabase. S-1-C. 0I1-/7A<-:0I1-/PA.H 0'O< 345odi'e .getOb6ect7a*e8919: 90I1-S/1IS.9: 9+9,4; +H-'- DA>S/O1D-' ;5 345odi'e .getOption897O. O0 DA>S O1D9,4; Step: L, .'?7CA.- .A21(ommand on Target)Technolog$) "racle *Same as !irst step tech !or connecting to #atabase. Schema) + logical schema *Same as !irst step tech !or connecting to #atabase. Ignore error) /alse .'?7CA.- .A21- 345odi'e .getOb6ect7a*e8919: 90I1-S/1IS.9: 9+9,4; (ommand on So rce)Empt$ Option: I 7O. O0 DA>S O1D

[Link] [Link] Page 2

[Link]

www.h$periong r .com

You might also like