Skip to main content
The Migration REST service assists in migrating an in-memory Atoti FRTB deployment to one that uses DirectQuery. It generates the SQL schema for the remote database and exports the in-memory data so it can be loaded there. The REST service is available at: host:port/frtb-starter/migrationHelper/ The service provides three endpoints: Supported databases: ClickHouse, Databricks, MSSQL, Snowflake.

Security configuration

The security configuration is handled by the dqMigrationHelperFilterChain 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
The response body contains the generated SQL DDL script for the extracted schema.

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:
DDL-only mode: When the localFileOutputHandler is omitted from the request body, the endpoint skips the data export and only returns the SQL DDL script. This is useful for previewing the generated schema without writing any files.

Populating hierarchy tables from parent-child stores

The generated DDL creates BOOK_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):
  1. Views + materialization: one intermediate view per hierarchy depth, unioned into a final view, then persisted as the hierarchy table. See hierarchy-from-views.sql.
  2. INSERT ... SELECT query: a single statement per hierarchy with one UNION branch per depth. See hierarchy-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.

Request objects

DatabaseExtractionDTO

PerformanceModifiers

LocalFileOutputHandler