Bods Scripting
Bods Scripting
For example, you can use the script to determine the most recent update time for a table,file
names,File locations etc and then assign that value to a variable. You can then assign the
variable to a parameter that passes into a data flow,format,datastore,table names etc.
Begin End
If else statements
Try catch
While statements
Assignment statements
Operators
The basic rules for the syntax of the script are as follows(Special characters used in the language
):
Each line ends with a semicolon (;). end of each bods statement
Variable names start with a dollar sign ($). to define variables(to replace the values)
Comments start with a pound sign (#) which helps you to write comments.This will not be taken
as a part of logic.
[] square brackets: if you want to take the value of variable,it copies variable value as a integer
String values are enclosed in single quotation marks ('). parameter passing
date_part() date_part('sysdate','mm');
Escape Characters: if any of the special character is a art of value i.e. you want skip the value
then go for escape characters
print('my neighbour's house') neighbour's ' is part of the text , for that we have to use backward slash \
to skip the value
Script Object
Smart Editor(To write a function it opens a window which allows to write code)
Ex We are running a fact table,it should whether the master table data is successfully run or not,else you
successfully execute the job
if(($G_mdexecutionstatus)=1)
begin
end
else
exec('C:\windows\cmd.exe','D:\md.fact');
print('Started MD job');
raise_exception;