Hi guys,I am working on SSIS, my question is I want to write a ssis package to parse XML file and the output should store in the database.
actual output should be like this in the database:
metername ,serial number,meterreadingid,medaitype,installdate
and here is the code
-<AMRDEF CreationTime="2013-08-09 00:18:42" version="7.0" Purpose="AMRDataRequest">
-<MeterReadings Purpose="OnRequestRead" CollectionTime="2013-08-09 19:57:11" Initiator="OnRequest" SourceIrn="30" SourceName="coll_0591_stuart" Source="Remote" Irn="21">
<Meter MediaType="900 MHz" ObservesDaylightSavings="true" TimeZoneOffset="300" Timezone="(GMT-05:00) Eastern Time (US & Canada)" TimeZoneIndex="11" Location="" SdpIdent="" AccountName="" AccountIdent="" RemovalDate="" InstallDate="2013-05-01 20:28:09" Description="" MeterType="REX" SerialNumber="03310266" IsActive="true" MeterName="03310266" MeterIrn="21"/>
+<ConsumptionData>
-<ConsumptionData>
<ConsumptionSpec Multiplier="1" MeasurementPeriod="EndOfIntervalSnapshot" TouBucket="Total" Direction="Received" UOM="kWh"/>
<Reading Value="0" TimeStamp="2013-08-09 00:00:00"/>
</ConsumptionData>
-<LoadProfileSummary>
<Channel Multiplier="0.1" Direction="Delivered" UOM="kWh" SumOfIntervalValues="155316.3" ReadingRangeEndTimestamp="2013-08-09 00:00:00" ReadingRangeStartTimestamp="2013-08-02 00:00:00" FirstIntervalTimestamp="2013-08-02 00:15:00" NumIntervalsRead="675" IntervalSeconds="900"/>
<Channel Multiplier="0.1" Direction="Received" UOM="kWh" SumOfIntervalValues="0" ReadingRangeEndTimestamp="2013-08-09 00:00:00" ReadingRangeStartTimestamp="2013-08-02 00:00:00" FirstIntervalTimestamp="2013-08-02 00:15:00" NumIntervalsRead="675" IntervalSeconds="900"/>
</LoadProfileSummary>
+<IntervalData>
-<IntervalData>
<IntervalSpec Multiplier="0.1" Direction="Received" UOM="kWh" TimestampEnd="2013-08-09 00:00:00" TimestampStart="2013-08-02 00:15:00" Channel="2" Interval="15"/>
<Reading TimeStamp="2013-08-02 00:15:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 00:30:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 00:45:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 01:00:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 01:15:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 01:30:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 01:45:00" RawReading="0"/>
What I have tried:
what I did: In this package, I haven't written any code for parsing.here is the output I am getting direct headers and I am not getting the all the data from the input data file and need to read the data for each header and get each reading value,
can anyone please help me on this task how to create the SSIS package, This help is greatly appreciated,
Thanks.