• 使用を開始する
  • 関連ドキュメント

スキーマを追加する

The Analytics app is able to pull multiple schemas for new Redshift, BigQuery, Snowflake, Amazon Athena, and PostgreSQL data sources. For other data sources, you can only have one schema per data source connection in Analytics, so you’d need to create separate data source connections to add more schemas.

If your data source can’t pull in multiple schemas, you can create custom tables that pull from tables in your other schemas. Custom tables allow you to write SQL that Analytics inserts directly into visual mode queries. So, you can create a custom table with the following SQL (replacing schema_name and table_name with relevant information from your database):

SELECT * FROM schema_name.table_name

参考のため、MySQL および PostgreSQL データ ソースに対して次のコマンドを実行して、すべてのスキーマで使用可能なすべてのテーブルとビューを確認できます。

SELECT * FROM information_schema.tables

複数のスキーマを反映する

スキーマをさらに追加するには、データ ソースの管理権限が必要です。

If Analytics supports multiple schemas for your data source, you can reflect them into one data source by doing the following:

  1. [Data (データ)] タブに移動します。

  2. 複数のスキーマを反映するデータ ソースを選択します。

  3. [Connection (接続)] タブに移動します。

  4. From the schema selector, select the schemas you’d like to add to Analytics.

  5. [保存] を選択します。 これにより、別の画面が表示されます。

  6. Select the schemas and tables to include in Analytics.

  7. [適用] を選択します。

Analytics automatically applies your changes then takes you to the Schema tab, where you can edit your schemas as needed.

使用可能なスキーマのリストを取得する

特定のスキーマを使用する場合を除き、ほとんどのスキーマは既定で公開に設定されます。データ ソースに反映するスキーマを探すには、データ ソースに対して次のクエリを実行して、使用可能なすべてのスキーマをリストします。ただし、すべてのデータ ソースにこの機能があるわけではありません。

Amazon Redshift

SELECT * FROM pg_namespace;

Microsoft SQL Server

SELECT * FROM sys.schemas

MySQL

MySQL では、物理的にスキーマはデータベースと同義であるため、スキーマは空白のままにすることができます。

PostgreSQL

SELECT nspname FROM pg_catalog.pg_namespace

Snowflake

SHOW SCHEMAS;

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。