Skip to content

Conversation

@reshmabidikar
Copy link
Contributor

@reshmabidikar reshmabidikar commented Feb 11, 2025

Added feature to export extra tables to address https://github.com/killbill/killbill-aviate-plugin/issues/354. The org.killbill.export.extra.tables.prefix property needs to be set to the prefix of the tables that need to be exported. For the sake of simplicity, we are assuming that the extra table have the account_id and tenant_id columns.

With regards to the ci failure, there is some leftover data in case of H2. So I've disabled some assertions for now.

Finally, there are a lot of intermediate commits for the purpose of debugging the ci failure. So I would suggest we squash and merge this PR.

@reshmabidikar reshmabidikar marked this pull request as draft February 12, 2025 12:50
@reshmabidikar reshmabidikar changed the title Changes for aviate-354 Export extra tables Feb 21, 2025
@reshmabidikar reshmabidikar marked this pull request as ready for review February 21, 2025 06:42
.bind("accountRecordId", context.getAccountRecordId())
.bind("tenantRecordId", context.getTenantRecordId())
.bind("accountRecordId", finalTableType == TableType.EXTRA ? accountId : context.getAccountRecordId())
.bind("tenantRecordId", finalTableType == TableType.EXTRA ? tenantId : context.getTenantRecordId())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't sound right: tenantId vs tenantRecordId?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tenantRecordId is just the name of the parameter, the actual column name is tenant_id in case of the aviate_catalog_xxx tables. See this line. See also this comment and this slack thread.

@sbrossie sbrossie merged commit 20f8100 into killbill:master Mar 5, 2025
11 checks passed
nick-at-finix pushed a commit to nick-at-finix/killbill that referenced this pull request May 5, 2025
* Changes for aviate-354

* Move testExportDataWithAviateTables to separate class to debug ci failure

* Debug ci failure

* Debug ci failure

* enable test

* Changes to include tenant level plans

* Add missing table creation statements

* Remove aviate-specific info and use extra.tables.prefix

* Remove empty DB check to avoid H2 failure

* Remove empty DB check to avoid H2 failure

* Drop custom tables at the beginning of each test and add back empty database check.

* Code cleanup

* Debug ci failure

* Debug ci failure

* Debug ci failure

* Changes as per review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants