Lakebridge transpile to translate from oracle to databricks sql

arushigulati
Databricks Partner

Hi Community,

I am currently working on a PoC to migrate data from Oracle to Databricks. As part of this, we are attempting to automate the DDL conversion process.

We are leveraging Databricks Labs Lakebridge for transpilation, but it is failing to convert a standard Oracle DDL. It appears the transpiler is unable to parse the PRIMARY KEY constraint.

CLI Command Used:

Bash
 
databricks labs lakebridge transpile \
--source-dialect oracle \
--input-source $INPUT_PATH \
--output-folder $OUTPUT_PATH \
--error-file-path $ERROR_PATH

Source Oracle DDL:

SQL
 
CREATE TABLE CUSTOMERS_V1 (
    CUSTOMER_ID NUMBER NOT NULL,
    CUSTOMER_NAME VARCHAR2(100) NOT NULL,
    EMAIL VARCHAR2(100),
    CITY VARCHAR2(50),
    PRIMARY KEY (CUSTOMER_ID)
);

Error - 

arushigulati_0-1769670207329.png

arushigulati_1-1769670261737.png

 

 - It is unable to parse simple PRIMARY KEY keyword.

Observations: If I remove the PRIMARY KEY line, the transpilation proceeds, but this isn't ideal for a large-scale migration where we need to maintain schema integrity (even if Primary Keys are only informational in Unity Catalog).

Has anyone else encountered this limitation with the Lakebridge CLI? Is there a specific configuration or a newer dialect flag I should be using to ensure constraints are handled correctly?

Thanks in advance for your help!