Import tables from other dbml

related with version 5.1 vs code
I have the folder structure below:

treeView-beta
    models/
        product alpla/
            alpha_source.dbml
            alpha_meta_source.dbml
        product beta/
            beta_source.dbml
        output_lineage/
            target_erd.dbml
            lineage_mapping.dbml

Any idea how we can import (Use * from)

  • alpha_source.dbml
  • beta_source.dbml
  • target_erd.dbml

into

  • target_erd.dbml

Thanks,

Hi @Ashish_Bajpai, in target_erd.dbml, you can use relative imports:

// target_erd.dbml

use * from '../product alpha/alpha_source'
use * from '../product alpha/alpha_meta_source'
use * from '../product beta/beta_source'

or you can define a barrel files with reuse if you want to import whole folders:

// product alpha/main.dbml

reuse * from './alpha_source'
reuse * from './alpha_meta_source'

// target_erd
use * from '../product alpha/main'

We tested and it worked on Linux. Is it not working on windows?

1 Like

Thanks,
I’ll check and update you soon.