Full transcript
0:00hey guys welcome to SSU dip so SIL this
0:03site and this is continuation of SSIS
0:06tutorial so today we're gonna discuss
0:08about den mechanics a manager so what is
0:11ten mechanics a manager so dynamic an
0:13Excel manager will be created
0:14automatically like we can see we have a
0:18scenario where we have sequence over
0:20table and we want to load the data from
0:22sequence over table to over platform
0:24destination and here we can see we have
0:27flat file name with sale underscore 2018
0:30which is our year then month then date
0:34then our and then minute so we have this
0:36flat file once we run this flat file on
0:401050 for our flat file names would be 10
0:43underscore 54 not testified when our
0:47time will be changed then we need to run
0:50our package then it will automatically
0:53generate a new file with the new date
0:55and time so let's have a look obstacles
0:58over table no we need to execute so as
1:02we can see it has total 6 column set
1:05order number say order date customer ID
1:07quantity value and country so go to on
1:10SS DT to implement the package so here
1:13we need to create one more package so
1:16right click on this si as practice then
1:18new SS is the case then I'm gonna rename
1:22this package with dynamic and XM manager
1:27then we need to drag-and-drop data flow
1:29task after that we need to double click
1:33on this data protest so it will directly
1:36move to data flow panel inside this data
1:38flow panel we need to configure our
1:40source so our source is already be
1:43source so we need to drag and drop
1:45already be source then we need to load
1:48data in our flat file this is work read
1:51file destination so we can drag and drop
1:53now we need to configure our source so
1:56double-click on this way DB source here
1:59we need to slip the next manager click
2:01on new here we have already made the
2:04connection so I gonna use that one so
2:06click on OK here we need to select the
2:08table so our table is cell info table so
2:12we can select and we
2:14so we can see we are getting the data
2:16now go to on columns now we want all the
2:20column then click on ok so here we need
2:23to connect with destination now we need
2:26to configure our destination they will
2:28click on this flat file destination then
2:32we need to select the flat file
2:34connection manager so I need to click on
2:36new then we want create delimited file
2:40we are ok with it so click on OK so here
2:44we need to slip the file name so we can
2:46browse and here we want to generate file
2:51with the name of sale so we need to
2:54write sale then click on open columns
2:56name in the first data row so we can
2:58check this check box go to own columns
3:01so as we can see we are getting the all
3:04columns now click on ok then good one
3:08mapping so mapping succeed now click on
3:11OK so once we run this package so it
3:14will generate a file with the name of
3:16sale so after some time once we run this
3:20package again then it will not going to
3:22create one more file with date and time
3:24so for that we need to create two
3:27variables so go to one variables so here
3:31I wanna use for folder name so this is
3:36our folder name datatype should be a
3:39string so we can select a string and
3:41then we need to specify the value so
3:44this is our folder path so we can copy
3:47and we need to paste that in our window
3:53and we can create one more variable with
3:56the name of filename and data type
4:02should be a string so we can select a
4:04string here I am NOT going to pass any
4:07hard code value so we want to generate
4:09the file name at runtime so go to on
4:12expressions we can click on this here in
4:16this expression we need to write some
4:19code so first of all we need to write
4:22sale and here we can check so we are
4:25getting the same
4:26sale then underscore then we need to
4:30concatenation which is plus then we want
4:34to get date and time so we can use get
4:38date for current date and time so this
4:41is our date time and sale underscore is
4:44our a string so we need to convert so
4:47here we have to write DT underscore W
4:52STR then we need to specify the size so
4:56I want to use and read now I need to
4:58evaluate so once we evaluate then we can
5:02see we are getting the date and time but
5:04we want to fit here then month then date
5:08ours and minute so I wanna fetch only
5:12four characters from starting so service
5:16string then we need to specify a start
5:20value so we want to start from 1 then
5:22how many characters we want for that so
5:25we can select four then close the
5:27bracket evaluate then we can see we are
5:30getting the data now we need to use
5:33underscore so we can again evaluate so
5:37we are getting the ear now we need to
5:40configure fourth month so I am going to
5:43copy this code and then plus sign and
5:47paste that value this time we want to
5:51get the value from 6 and we want to get
5:54only two characters for month so as you
5:58can see we are getting told now again we
6:01need to specify our concatenate symbol
6:04which is plus then paste this code and
6:08this time we start from 9 and we want to
6:12get only two characters for date now put
6:15one evaluate so we are getting 0 for
6:18between this we need to use underscore
6:21so we can specify underscore now we can
6:24evaluate so as we can see we are getting
6:27here month and it now we need to get our
6:31so again we need to use underscore so
6:34this is our underscore then I wanna
6:37paste that value
6:38so this time we won't start from 12 and
6:41we want only two characters now we can
6:44evaluate and we can see we are getting
6:46the value this is for our now last time
6:50we need to use four minute
6:52so underscore concatenate symbol then
6:56paste that value so here we can see we
7:00are getting from 12 then we need to
7:02start from 15 and we need to use only
7:05two character so we can evaluate and we
7:07can see we are getting the minute as
7:09well now we need to use the file
7:12extension should be txt file now we can
7:15evaluate and we are getting the value so
7:18we can okay so here this is our filename
7:21and this is our folder name so we have
7:24done it now we can save this package and
7:27go to one flat file connection manager
7:29then we need to press f4 to get the
7:32properties inside this property we can
7:36see we have expressions so click on this
7:38expression and here we have connection
7:43string so in this connection a string we
7:45need to go on expressions then here we
7:49have folder path so we can drag and drop
7:51this folder path within expressions then
7:54we need to use concatenate symbol which
7:57is plus then we need to drag and drop
8:00this file name now we can click on
8:03evaluate so this is our folder path
8:05inside this folder of our flat file name
8:09should be this and this flat file would
8:12be generated now become ok again okay so
8:16as you can see time is a level 6 so I
8:20gonna run this package once we run this
8:23practice then our file should be
8:25generated with the time 11:6 good 1
8:29folder so here we can see we are getting
8:32the file with 23 underscore 0 6 so this
8:37is the world 11 6 so I gonna stop this
8:40package and again run this package when
8:43our time will be changed so as you can
8:47see time has been changed I gonna run
8:49this package one more time so click on
8:51start
8:53so new file should be generated go to
8:56one folder as we can see we got a new
9:00file so this is the one then we can
9:03examine injure so it will generate a new
9:05file on every education if the time will
9:08be changed because it's dependent on
9:10time so thank you so much for watching
9:13this video if you like this video please
9:16subscribe our channel to get many more
9:18videos and don't forget to press the
9:20bell icon to get the notification of our
9:22newly updated videos thank you so much