Closed amexboy closed 5 years ago
loadData
is part of the Liquibase core, so you shouldn't need to load any extensions. How are you using loadData
in your change set? It requires a map and a closure. If one of them is missing, you'd get an error like the one you are seeing. Here is an example of a valid loadData
element:
changeSet (id: 'myChangeSet', author: 'me') {
loadData(file: 'data.csv', tableName: 'myTable') {
column(name: 'id')
column(name: 'description')
}
}
@stevesaliman I didn't know the closure was required. Even an empty closure works.
The xml counter part takes identityInsertEnabled?
@stevesaliman identityInsertEnabled is part of an extension (liquibase-mssql). I couldn't figure out how to load that. I even tried to create a new extension, but it is not being detected, any clue?
@stevesaliman I just figured out that the groovy-dsl doesn't detect extensions and I made my modifications to enable that.
https://github.com/liquibase/liquibase-groovy-dsl/pull/36
Sent a pull request
I just released version 2.0.2 of the Groovy DSL with the changes that allow extension provided changes to be loaded. Thank you for all of your help on this issue.
Glad I could help.
Amanuel Nega (Software Engineer)
On Sun, Nov 4, 2018 at 9:59 PM Steven C. Saliman notifications@github.com wrote:
Closed #33 https://github.com/liquibase/liquibase-groovy-dsl/issues/33.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/liquibase/liquibase-groovy-dsl/issues/33#event-1944961668, or mute the thread https://github.com/notifications/unsubscribe-auth/AG_trj8SsZiAxQ1UoWSttPfijdqEGc3pks5urzkKgaJpZM4WWO-m .
Hi
I see the examples has loadData, but liquibase complains
'loadData' is not a valid element of a ChangeSet
How can load extensions?