KingdomFirst / Excavator

We have now released Bulldozer on GitHub. Bulldozer is the super-powerful big brother to Excavator. Because Bulldozer is now published on GitHub we will no longer be supporting Excavator. Thank you for all the support here!
https://github.com/KingdomFirst/Bulldozer
19 stars 20 forks source link

Column 'Card_Type' does not exist #156

Closed DerekMangrum closed 7 years ago

DerekMangrum commented 8 years ago

Hello. I am working on a data import from an F1 database and I got the following error:

8/4/2016 2:41:34 PM,Transform Data,"System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Column 'Card_Type' does not exist.
   at OrcaMDF.Core.MetaData.Row.ensureColumnExists(String name)
   at OrcaMDF.Core.MetaData.Row.get_Item(String name)
   at Excavator.F1.F1Component.MapContribution(IQueryable`1 tableData, List`1 selectedColumns)
   at Excavator.F1.F1Component.TransformData(Dictionary`2 settings)
   at Excavator.ProgressPage.bwImportData_DoWork(Object sender, DoWorkEventArgs e)"

When I look at the Contribution Table in the F1 database, I see the following columns...

    [Individual_ID] [int] NULL,
    [Household_ID] [int] NULL,
    [Fund_Name] [varchar](50) NULL,
    [Sub_Fund_Name] [varchar](50) NULL,
    [Received_Date] [datetime] NULL,
    [Amount] [money] NULL,
    [Check_Number] [varchar](20) NULL,
    [Pledge_Drive_Name] [varchar](50) NULL,
    [Memo] [varchar](2000) NULL,
    [Contribution_Type_Name] [varchar](20) NULL,
    [Stated_Value] [money] NULL,
    [True_Value] [money] NULL,
    [Liquidation_cost] [money] NULL,
    [ContributionID] [int] NULL,
    [BatchID] [int] NULL

We just got this F1 database today (Aug 04, 2015). It looks like Excavator is looking for columns that don't exist in my DB.

I was hoping you had some thoughts? Thanks!

DerekMangrum commented 8 years ago

Hello. I have done some more digging. It looks like there are five columns in the 'Contribution' Table that were missing from the F1 database they delivered to us. Not sure why they are not there (old App/DB version perhaps)? I added the following columns to the 'Contribution' Table in the F1 database to eliminate any further errors:

    [Card_Type] [varchar](50) NULL,
    [Last_Four] [varchar](50) NULL,
    [Fund_Is_active] [bit] NULL,
    [Fund_GL_Account] [varchar](50) NULL,
    [Sub_Fund_GL_Account] [varchar](50) NULL

Thank you. I hope this information helps.

dcs619 commented 8 years ago

@DerekMangrum this seems to be an issue with F1 changing their database schematic. The DB we received had those fields, but I'm not sure if we requested that at one point or if they have a "default" they use.

I'm leaving this issue open since we need a way to ignore missing fields if they do change their schema.