Pat
Esteemed Contributor

@Quentin Maire​ , If you cannot access data from outside you will have to migrate it from inside.

If the data is stored in the root container and is not accessible from outside (I think you should be able to make this data accessible with the Azure Policies, but I don't know how to do it right now) the option is to create separate location (storage account, container). CREATE EXTERNAL tables and migrate data there 1:1, for example, if you have

my_database.my_table_1, then in existing workspace you attach the new storage and migrate data:

CREATE EXTERNAL TABLE my_database_ext.my_table_1
(
col_1 INT,
col_2 STRING
)
LOCATION 'abfss://some-location/my_table_1';
 
INSERT INTO my_database_ext.my_table_1 
SELECT * FROM my_database.my_table_1;

then in your new workspace, either you use external location as is:

CREATE EXTERNAL TABLE my_database.my_table_1
(
col_1 INT,
col_2 STRING
)
LOCATION 'abfss://some-location/my_table_1';

or you add extra step and copy data from these external tables into managed ones.

Either way, it seems like there is a need to migrate the data.

Ideally if you could access the storage in the root container, create the external table on top of it. Then in new workspace

INSERT INTO table_1
SELECT * FROM ext_table_1;

View solution in original post