2

I have three organizations which want to collaborate. All three of them have the same backend database and tables, and want to run a federated query across these three tables. Is that possible using snowflake?

2 Answers2

1

If they each have one "table" each, and data share it to the other two, that can have the three "tables" and

SELECT a.*, b.*, c.*
FROM mytable AS a
JOIN their_table_one AS b
JOIN the_other_table AS c

just fine.

Simeon Pilgrim
  • 22,906
  • 3
  • 32
  • 45
0

You can import all tables into Snowflake and then create views that combine these tables so that they are visible as one view.

Example:

CREATE VIEW Table1_v
AS
SELECT col1, col2, col3, 'Source A' AS src
  FROM SourceA_Table1
 UNION ALL
SELECT col1, col2, col3, 'Source B' AS src
  FROM SourceB_Table1
 UNION ALL
SELECT col1, col2, col3, 'Source C' AS src
  FROM SourceC_Table1;
Michael Golos
  • 1,814
  • 1
  • 6
  • 16