Sorting of Student Marks & Loading in Database
- Prepare excel file
- File > New > Transformation
- Press Design tab in palette
- Drag Input > Excel Input, Output > Table output, Transform > Sort Rows Steps onto workspace
- Dbl click Excel Input
- Browse for the excel file you want to provide as an input
- Press Add Button
- In Sheets tab select the sheet using "Get sheetnames" & select the sheet containing data
- Select fields tab press "get fields from header row" to fetch all the fields from the selected sheet
- press ok to close the window
- Connect the all the steps by creating a hop between the steps using Shift + Drag from one step to another
- Select the Sort rows step
- select the field name from the dropdown list by clicking a cell of the table which appears
- Select the order as Ascending > N as we want to sort the rows in descending order
- Click ok to close the window
- dbl click table output
- In connection input the connection you want by creating a new one or using existing.
- Lets say we want to create a new connection to Sql server See fig for example of the fields to fill up
- test the connection by clicking on test button
- Press OK to close the window
- in the target table input put the Table name you wat to use as te output or write a name to create a new one
- Click the sql button to generate a sql statement to create the table in the schema you have specified beforehand. Click Execute Click Close
- select the database fields mapping tab to select the fields of the stream & db fields for mapping, Click ok
- Click ok
- Save & run
Comments
Post a Comment