host:port/frtb-starter/migrationHelper/
The service provides three endpoints:
- SQL Schema Generation - Generate DDL scripts without exporting data
- Database Template Extraction - Export data for a specific database using project defaults
- Custom Database Extraction - Export data with custom store and field configuration
Security configuration
The security configuration is handled by thedqMigrationHelperFilterChain bean defined in the FRTBSecurityFilterChainsConfig. The default security config limits
the use of this service to only ADMIN users.
Configuration
The migration export can be enabled or disabled via the following property:SQL schema generation
Generates the SQL DDL script (CREATE DATABASE, CREATE SCHEMA, CREATE TABLE, foreign keys) from the in-memory schema without exporting any data. URL:host:port/frtb-starter/migrationHelper/sqlSchema
Request Type: GET
Query Parameters:
When a parameter is not provided, the following fallback chain is applied:
Examples:
Database template extraction
Exports data using the project defaults (SA and IMA cubes, lookup stores) for the specified database type. URL:host:port/frtb-starter/migrationHelper/extractForDatabase/{database}
Where {database} is one of: clickhouse, databricks, mssql, snowflake.
Request Type: POST
Body: LocalFileOutputHandler
Custom database extraction
A custom extraction can be provided to export specific stores and datastore schemas. User-provided values are merged on top of the project defaults: user fields take precedence, omitted fields inherit the defaults. URL:host:port/frtb-starter/migrationHelper/extract
Request Type: POST
Body: DatabaseExtractionDTO
Example:
Populating hierarchy tables from parent-child stores
The generated DDL createsBOOK_HIERARCHY and LEGAL_ENTITY_HIERARCHY tables. These are the join targets used by the cubes’ organizational hierarchies. In the in-memory accelerator, these tables are computed by Atoti FRTB from the parent-child input data (BOOK_PARENT_CHILD, LEGAL_ENTITY_PARENT_CHILD). In DirectQuery mode, the equivalent transformation must happen in the remote database. The migration helper exports the parent-child stores as the source of truth, but populating the flattened hierarchy tables is left to the operator.
Two equivalent patterns are available as drop-in reference scripts (15-level book hierarchy, 5-level legal-entity hierarchy, Snowflake syntax; adjust depth and dialect per project):
- Views + materialization: one intermediate view per hierarchy depth, unioned into a final view, then persisted as the hierarchy table. See
hierarchy-from-views.sql. INSERT ... SELECTquery: a single statement per hierarchy with one UNION branch per depth. Seehierarchy-from-queries.sql.
Without this step, queries against the organizational hierarchies will return empty results. The migration helper produces the table schema but not the derivation logic, which is project- and database-specific.
Sign-Off fields in the generated DDL
The default extraction preserves whichever Sign-Off fields are present in the in-memory schema._Version is always excluded (it is an in-memory task-tracking column with no DQ equivalent); Source and Input type flow through, matching the DQ-with-adjustments deployment shape. For Sign-Off without adjustments in DQ, override fieldsToExclude to drop them too.