AnsweredAssumed Answered

Flat File Header as Value in Database table

Question asked by kandikatt790203 on Jan 30, 2018
Latest reply on Feb 1, 2018 by kandikatt790203

I have a CSV flat file source as below. I have to load this data to target Database table as below. How can I achieve this.The months are dynamic.Every month we get past 12 months data.

 

Source CSV:

Account NbrAccount StatusVendor TypeInvoice TypeMetricsNOV-16DEC-16JAN-17FEB-17
2578122ActiveSupplierCommodityKWH7111.1113476.198657.145647.06
2578122ActiveSupplierCommodityUSD335.86636.48408.88266.71

 

Target Table :

Account NbrAccount StatusVendor TypeInvoice TypeMetricsMonthAmount
2578122ActiveSupplierCommodityKWHNOV-167111.11
2578122ActiveSupplierCommodityUSDNOV-16335.86
2578122ActiveSupplierCommodityKWHDec-1613476.19
2578122ActiveSupplierCommodityUSDDEC-16636.48
2578122ActiveSupplierCommodityKWHJAN-178657.14
2578122ActiveSupplierCommodityUSDJAN-17408.88
2578122ActiveSupplierCommodityKWHFEB-175647.06
2578122ActiveSupplierCommodityUSDFEB-17266.71

Outcomes