We have simple script consider the one below as an example.
Script:
create table #tableABC (
col A varchar(10),
col B varchar(10),
col C varchar(10)
)
insert into #tableABC
select 'A' ,'B', 'C'
The above script is considered as an SP and excepted in script task and it works. but we are unable to access the #table in the following copy activity
select * from #tableABC;
Azure data factory doesn't support automatic temporary table creation and we cannot set table name with ## as starting.
How to create temp tables in SQL to be used in several ADF activities?
Refer the above link, which has lot of suggestions.
https://github.com/MicrosoftDocs/azure-docs/issues/35449
Also refer the above blog for additional support.
Note: Do not close the SQL connection session after creating temporary table.
Alternate suggestion:
Instead of using the Temp Tables, use the table type for easy usage.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.