Thanks - that helps a little. You still haven't mentioned the actual results you got, but I'll take a guess. I think that you are expecting that when the loadData change is executed, the columns that have a defaultValue attribute will be populated with that defaultValue if the entry in the CSV file is null. I also think that your actual results are that the rows where those values are null in the CSV file are still null in the database, and that no error messages were shown.
I think that the issue is that the column tag probably does not support the defaultValue attribute when used inside a loadData change. The documentation is unclear on this since in the docs for loadData only says "see the column tag documentation", which does say that there is a defaultValue attribute that can be set.
I see two possible approaches to this:
1 - when you create the table itself you could set the default value for the columns. It isn't clear if you are using Liquibase to manage your schema already or not. If there is currently no defaultValue set for those columns and the table already exists, you could create a changeset to set that up.
2 - you could ensure that the CSV file has the default values where needed.
I see two possible approaches to this:
1 - when you create the table itself you could set the default value for the columns. It isn't clear if you are using Liquibase to manage your schema already or not. If there is currently no defaultValue set for those columns and the table already exists, you could create a changeset to set that up.
2 - you could ensure that the CSV file has the default values where needed.
Personally, I would probably use option #2, but it would depend on whether this is a recurring task or a one-time only task, whether the default values are always the same in a recurring scenario, and other similar considerations.
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/