SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Store and compare values (parameter/variable)

Reply
Contributor
Posts: 24

Store and compare values (parameter/variable)

Hi,

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

Dani

Super User
Posts: 5,431

Re: Store and compare values (parameter/variable)

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.

Data never sleeps
Contributor
Posts: 24

Re: Store and compare values (parameter/variable)

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.

Super User
Posts: 5,431

Re: Store and compare values (parameter/variable)

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.

Data never sleeps
Ask a Question
Discussion stats
  • 3 replies
  • 328 views
  • 3 likes
  • 2 in conversation