02-03-2014 07:46 AM
I have to compare folder name saved on server (e.g. 2013) with value in table (e.g. where year is 2013). If a match found then read all files from this folder.
My Idea is to to save a folder name in var1 and value from table in var2. If they are equal then go to next transformation.
The problem is i am very new to DI Studio and need some suggestion and right way to implement it?
Thanks in Advance and Best Regards
02-03-2014 09:04 AM
I'm not sure how to compare a name on a folder - don't you need to specify the name of the folder in some way first? Or do you mean that you want to if a folder with a specific name exists, if yes, then import all files?
I suggest some pre-code, or User written that searches for the folder with appropriate name, if exists, import the folder contents to SAS table. Then use the lopp transform that calls the job where you actually import the file, using the "folder" SAS table as input to parameterize the called job.
Or, if the files have identical structure, you may use aggregate filename technique.
02-12-2014 03:18 AM
I am using user written transformation where i save my folder name in a var1 and then giving the whole path in another var2 concat with this var1. At the end with a boolean value of var2 0 or 1 i can identify exist or not.
Thanks for answer.
02-13-2014 07:03 AM
So, it's not parameterized for the job, path and folder name are "hard coded" for each job that uses the transforamtion?
You use the dopen function, check the return code.