Reputation: 133
I am trying to create a table in a target snowflake account say snowflake_acccount1 from source snowflake account snowflake_acccount2 using data factory copy activity. But that didn't work as the data set/linked services can support only respective account at a time each.
Below is the query that i want to use to create a table from a snowflake_acccount2 in snowflake_acccount1 using azure data factory
create table if not exist snowflake_acccount1_schema.table1 as select * from snowflake_acccount2_schema.table1
I tried using script activity again that only support for one dataset to connect at a time.
is there any way to achieve this using ADF?
Upvotes: 0
Views: 591
Reputation: 8392
There is no such way to query another database or Copy table from one snowflake account to another in ADF as in snowflake linked service, we supposed to give the default database to be used and copy activity cannon create the table in snowflake it will just transfer the data.
The workaround is to use staging in snowflake as below:
create or replace table tablename
using template (
select array_agg(object_construct(*))
from table(
infer_schema(
location=>’@stagedcopy/address’,
file_format=>’my_parquet_format’
)
));
You can refer this document for more information.
Upvotes: 1