Times you might want to get list of all files within a directory and process them serially using Data Services. This script will come handy in such instances.
# define parent folder and file path variables to be used in DIR below
$path_and_file = $input_path || $input_file;
# define target file
$file_list = $input_path || 'filelist.txt';
# construct the DIR command
$dir_cmd = 'dir [$path_and_file] /b /s /a:-d > [$file_list]';
# pushes results of DIR to a file, use flag 8 to give a return code and
# any messages that appear from the CMD window after completing the DIR
$cmd_return = exec( 'cmd.exe', [$dir_cmd], 8 );
print( $cmd_return );
if ( file_exists( $file_list ) = 1 ) print( 'File list created' );
You can now use filelist.txt in a file format and populate in data..
Expressions are a combination of constants, operators, functions, and variables that evaluate to a value of a given data type. Expressions can be used inside script statements or added to data flow objects. Scripting Guidelines Statements in a script object or custom function must end with a semicolon (;) Comment lines must start with a ..
Data Services provides full access to the repository metadata tables and views for metadata analysis. To access this metadata either we can use SQL SELECT statements or use the metadata reporting from Management Console. Internal Metadata Let us first take a look into a few important internal metadata tables. This set of tables and views ..
Symptom What is the communication flow between Data Services Designer and Data Services Job Server? Is it possible to set an initiating port for Data Services Designer and Job server communication? Environment SAP Data Services Resolution Designer listens on a random range of ports. You can restrict this range. For purposes of this explanation we shall assume ..
Symptom Error when trying to run a Data Services / Data Integrator batch job from the Designer. Getting error “The job server you selected is not working” although job server is up an running and jobs can be run from Management Console Administrator tool. “Job Server <host>:<port> – notification server error (BODI-1241023)” Environment Data Integrator ..