Forum Discussion
rvp_ordix
2 years agoHelper I
How to import Warehouse View in Dataflow Gen2?
My data is stored various tables of a Fabric Warehouse, and now I want to build a Dataflow to transform that data. To do that, however, I need to create a control table from the various Views of INFO...
Anonymous
2 years agoNot applicable
Hi rvp_ordix ,
You can create the storage table with the following sql statement.
CREATE PROCEDURE PopulateControlTable AS
BEGIN
-- Insert data from 'datamart' schema
INSERT INTO ControlTable (TABLE_NAME)
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND TABLE_SCHEMA = 'datamart';
-- Insert data from 'core' schema
INSERT INTO ControlTable (TABLE_NAME)
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND TABLE_SCHEMA = 'core';
-- Insert data from 'staging' schema
INSERT INTO ControlTable (TABLE_NAME)
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND TABLE_SCHEMA = 'staging';
END;
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.