Forum Discussion

Chandana_V's avatar
Chandana_V
Frequent Visitor
1 year ago
Solved

Custom Path for Delta Table's Files Created from External Table underlying Files

Hi,

 

I created a Delta table using the underlying files of an external table. I want to specify a different path for the underlying files so they aren't stored in the same location as the external table's underlying files. Is there a way to set a new path for the Delta table while keeping the external table files separate? 

 

Thank You

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Chandana_V,

    For the default lakehouse table level, it not allow you to create sub folders. I'd like to suggest you store these on the file level or change to use the lakehouse which enable the preview schema features.
    Regards,

    Xiaoxin Sheng

  • Anonymous's avatar
    Anonymous
    1 year ago

    You can specify a different path for the underlying files of a Delta table
    This way, the Delta table’s files will be separate from the external table’s files.
    CREATE TABLE delta_table
    USING DELTA
    LOCATION 'path/to/new/delta/table';

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Chandana_V,

    For the default lakehouse table level, it not allow you to create sub folders. I'd like to suggest you store these on the file level or change to use the lakehouse which enable the preview schema features.
    Regards,

    Xiaoxin Sheng

    • mmaxood's avatar
      mmaxood
      New Member

      Hi, I have a lakehouse with schema preview features but I am getting path that already exists:

      Please see the below image:

       

      Can someone please assist on this?

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    You can specify a different path for the underlying files of a Delta table
    This way, the Delta table’s files will be separate from the external table’s files.
    CREATE TABLE delta_table
    USING DELTA
    LOCATION 'path/to/new/delta/table';