👤 This documentation is intended for SQL Users. SQL Users will need to reach out to their Site administrators to ensure tables are cached within Periscope.
Note: Cross-Database Joins are only available with the Cache or Warehouse Infrastructure.
In a cross-database join, Periscope pulls information from tables across multiple data sources, as if they existed within the same database. In order to perform a cross-database join, all of the tables in the query must exist on the Periscope Cache. Customers on MySQL and SQL Server may already be familiar with cross-database joins for databases that are on the same host.
Depending on whether the data is cached in the Redshift Cache or Snowflake Cache, the query must use Redshift-compatible or Snowflake-compatible syntax.
Cross database joins use the same syntax as regular single database joins. Using two example database, ExampleOne and ExampleTwo, the example below shows a join between ExampleOne's Dog table in SchemaOne with ExampleTwo's Animal table in SchemaTwo.
Table names can also be aliased to clear up some ambiguity:
If an error is returned while trying to do a cross-database join, ensure that the syntax is Redshift-compatible or Snowflake-compatible depending on the cache infrastructure being used. Ask your Site Administrator to verify that all the tables used in the join are cached.