hey I have below data in xml, now I want to load the data as a single row in single table all these values
i tried using ssis package, but while connection xml source to oledb destination, it is showing 4 different parts like site,vesselvoyage,cranemovedetails,delaydetails
i can select only one like site and loading the that site columns values only but i want to select all columns values of site,vesselvoyage,delaydetails and load in a single row
in a table.
how?
-----------------------
next is it better to take ssis package to load the data from xml file to table or any other better option. becasue here in this file we get only one row date and
in future we may get multiple rows data. I never worked on xml
<?xml version="1.0"?>
-<Main>
-<site>
<S_ID>2</S_ID>
<Site_ID>APP</Site_ID>
<Name>APAPA</Name>
<Company_Name>APM Terminals APAPA</Company_Name>
<Region>AME</Region>
<Time_Zone>GMT +5.30</Time_Zone>
</site>
-<VesselVoyage>
<Site_ID>APP</Site_ID>
<Via>0081410</Via>
<Inbound_Voyage_No>1409</Inbound_Voyage_No>
<Outbound_Voyage_No>1410</Outbound_Voyage_No>
<Vessel_ID>008</Vessel_ID>
<Vessel_Name>MAERSK CONAKRY</Vessel_Name>
<Vessel_Operator>MSK</Vessel_Operator>
<Vessel_Length>249.12</Vessel_Length>
<Service>FEW2</Service>
<ETA>2014-11-01T07:00:00</ETA>
<ATA>2014-11-01T07:55:00</ATA>
<Labor_On_Board>2014-11-01T09:25:00</Labor_On_Board>
<Labor_Off_Board>2014-11-03T01:35:00</Labor_Off_Board>
<ETD>2014-11-03T02:00:00</ETD>
<ATD>2014-11-03T03:36:00</ATD>
<Allocated_Berth>17</Allocated_Berth>
<Line_Operator>MSK</Line_Operator>
<Ready_To_Work>2014-11-01T09:20:00</Ready_To_Work>
<GenerateTDR>1</GenerateTDR>
</VesselVoyage>
-<Crane_Move_Details>
<Crane_Move_Id>8238</Crane_Move_Id>
<Site_ID>APP</Site_ID>
<Daily_Shift_No>189</Daily_Shift_No>
<Crane_ID>MO12</Crane_ID>
<Via>G891504</Via>
<Bay_Code>26</Bay_Code>
<Ctr_Length>40</Ctr_Length>
<Move_Kind>DSCH</Move_Kind>
<Moves>19</Moves>
<Created_Date>2015-03-29</Created_Date>
<Created_On>2015-03-29T04:44:26.920</Created_On>
<Last_Updated_On>2015-03-29T04:44:26.920</Last_Updated_On>
<Created_By>EXPRESS</Created_By>
<Last_Updated_By>EXPRESS</Last_Updated_By>
<Freight_Kind>FCL</Freight_Kind>
<start_time>12:11:31</start_time>
<duration>04:32:31</duration>
<start_date>2015-03-26T12:11:31</start_date>
<Location>Hatch</Location>
</Crane_Move_Details>
-<Delay_Details>
<Delay_Detail_Id>417</Delay_Detail_Id>
<Site_ID>APP</Site_ID>
<Crane_ID>MO10</Crane_ID>
<Daily_Shift_No>67</Daily_Shift_No>
<Delay_Code>CA</Delay_Code>
<Start_Time>09:02:56</Start_Time>
<Duration>00:18:00</Duration>
<Via>6FP1502</Via>
<Created_On>2015-03-24T08:16:37.050</Created_On>
<Last_Updated_On>2015-03-24T08:16:37.050</Last_Updated_On>
<Create_By>EXPRESS</Create_By>
<Last_Updated_By>EXPRESS</Last_Updated_By>
<start_date>2015-02-03T09:02:56</start_date>
<end_time>2015-02-03T09:20:44</end_time>
</Delay_Details>
</Main>
i tried using ssis package, but while connection xml source to oledb destination, it is showing 4 different parts like site,vesselvoyage,cranemovedetails,delaydetails
i can select only one like site and loading the that site columns values only but i want to select all columns values of site,vesselvoyage,delaydetails and load in a single row
in a table.
how?
-----------------------
next is it better to take ssis package to load the data from xml file to table or any other better option. becasue here in this file we get only one row date and
in future we may get multiple rows data. I never worked on xml
<?xml version="1.0"?>
-<Main>
-<site>
<S_ID>2</S_ID>
<Site_ID>APP</Site_ID>
<Name>APAPA</Name>
<Company_Name>APM Terminals APAPA</Company_Name>
<Region>AME</Region>
<Time_Zone>GMT +5.30</Time_Zone>
</site>
-<VesselVoyage>
<Site_ID>APP</Site_ID>
<Via>0081410</Via>
<Inbound_Voyage_No>1409</Inbound_Voyage_No>
<Outbound_Voyage_No>1410</Outbound_Voyage_No>
<Vessel_ID>008</Vessel_ID>
<Vessel_Name>MAERSK CONAKRY</Vessel_Name>
<Vessel_Operator>MSK</Vessel_Operator>
<Vessel_Length>249.12</Vessel_Length>
<Service>FEW2</Service>
<ETA>2014-11-01T07:00:00</ETA>
<ATA>2014-11-01T07:55:00</ATA>
<Labor_On_Board>2014-11-01T09:25:00</Labor_On_Board>
<Labor_Off_Board>2014-11-03T01:35:00</Labor_Off_Board>
<ETD>2014-11-03T02:00:00</ETD>
<ATD>2014-11-03T03:36:00</ATD>
<Allocated_Berth>17</Allocated_Berth>
<Line_Operator>MSK</Line_Operator>
<Ready_To_Work>2014-11-01T09:20:00</Ready_To_Work>
<GenerateTDR>1</GenerateTDR>
</VesselVoyage>
-<Crane_Move_Details>
<Crane_Move_Id>8238</Crane_Move_Id>
<Site_ID>APP</Site_ID>
<Daily_Shift_No>189</Daily_Shift_No>
<Crane_ID>MO12</Crane_ID>
<Via>G891504</Via>
<Bay_Code>26</Bay_Code>
<Ctr_Length>40</Ctr_Length>
<Move_Kind>DSCH</Move_Kind>
<Moves>19</Moves>
<Created_Date>2015-03-29</Created_Date>
<Created_On>2015-03-29T04:44:26.920</Created_On>
<Last_Updated_On>2015-03-29T04:44:26.920</Last_Updated_On>
<Created_By>EXPRESS</Created_By>
<Last_Updated_By>EXPRESS</Last_Updated_By>
<Freight_Kind>FCL</Freight_Kind>
<start_time>12:11:31</start_time>
<duration>04:32:31</duration>
<start_date>2015-03-26T12:11:31</start_date>
<Location>Hatch</Location>
</Crane_Move_Details>
-<Delay_Details>
<Delay_Detail_Id>417</Delay_Detail_Id>
<Site_ID>APP</Site_ID>
<Crane_ID>MO10</Crane_ID>
<Daily_Shift_No>67</Daily_Shift_No>
<Delay_Code>CA</Delay_Code>
<Start_Time>09:02:56</Start_Time>
<Duration>00:18:00</Duration>
<Via>6FP1502</Via>
<Created_On>2015-03-24T08:16:37.050</Created_On>
<Last_Updated_On>2015-03-24T08:16:37.050</Last_Updated_On>
<Create_By>EXPRESS</Create_By>
<Last_Updated_By>EXPRESS</Last_Updated_By>
<start_date>2015-02-03T09:02:56</start_date>
<end_time>2015-02-03T09:20:44</end_time>
</Delay_Details>
</Main>
tsrkreddy