---
title: Apple App Store
description: Apple App Storeを接続して同期の動作を把握し、書き込まれるすべてのテーブルと列をクエリします。
species: reference
---
# Apple App Store

発行者 ID、キー ID、秘密鍵、ベンダー番号を使って Apple App Store を接続します。このソースは `titan.apple_app_store` に 1 個の固定テーブルを書き込みます。
```sql
select
  event_date,
  app_name,
  app_apple_id
from titan.apple_app_store.sales_subscriber_detailed
limit 10
```

## Apple App Storeを接続する

1. **アプリ**を開き、**アプリを接続**を選択してから、**Apple App Store**を選択します。
2. 発行者 ID、キー ID、秘密鍵、ベンダー番号を入力します。
3. テーブルを確認してからソースを保存します。
4. 初回の実行が完了するまで**同期履歴**を確認します。

認証情報はシークレットとして保存されます。レイクの列になったり、クエリ結果に表示されたりすることはありません。

## 同期の動作

Supernova は詳細なサブスクリプション売上レポートをダウンロードし、レポートの各フィールドを型付きの列として保持します。

新しいソースは接続時に同期し、その後はスケジュールに従います。デフォルトの繰り返し間隔は 4 時間です。実行が中断しても、完了した進捗を保持して安全に再試行します。

すべてのレイクのテーブルには[システム列](/docs/concepts/your-lake#システム列) `_synced_at` と `_deleted` もあります。以下の列リファレンスにはソースの列のみを記載しています。

## テーブルリファレンス

### `sales_subscriber_detailed`

`titan.apple_app_store.sales_subscriber_detailed` には 26 個のソース列があります。

```columns table=apple_app_store.sales_subscriber_detailed
event_date                              date pk             ソースのフィールド `event_date`。
app_name                                string              ソースのフィールド `app_name`。
app_apple_id                            integer             ソースのフィールド `app_apple_id`。
subscription_name                       string pk           ソースのフィールド `subscription_name`。
subscription_apple_id                   integer             ソースのフィールド `subscription_apple_id`。
subscription_group_id                   integer             ソースのフィールド `subscription_group_id`。
standard_subscription_duration          string              ソースのフィールド `standard_subscription_duration`。
subscription_offer_name                 string              ソースのフィールド `subscription_offer_name`。
promotional_offer_id                    string              ソースのフィールド `promotional_offer_id`。
subscription_offer_type                 string              ソースのフィールド `subscription_offer_type`。
subscription_offer_duration             string              ソースのフィールド `subscription_offer_duration`。
marketing_opt_in_duration               string              ソースのフィールド `marketing_opt_in_duration`。
customer_price                          float               ソースのフィールド `customer_price`。
customer_currency                       string              ソースのフィールド `customer_currency`。
developer_proceeds                      float               ソースのフィールド `developer_proceeds`。
proceeds_currency                       string              ソースのフィールド `proceeds_currency`。
preserved_pricing                       string              ソースのフィールド `preserved_pricing`。
proceeds_reason                         string              ソースのフィールド `proceeds_reason`。
client                                  string              ソースのフィールド `client`。
device                                  string              ソースのフィールド `device`。
country                                 string              ソースのフィールド `country`。
subscriber_id                           integer pk          ソースのフィールド `subscriber_id`。
subscriber_id_reset                     string              ソースのフィールド `subscriber_id_reset`。
refund                                  string pk           ソースのフィールド `refund`。
purchase_date                           date pk             ソースのフィールド `purchase_date`。
units                                   integer             ソースのフィールド `units`。
```

## 削除と履歴

行はソースのキーでマージされます。ソース側で行の削除を確認できた場合、Supernova は行を残して `_deleted` を設定します。クエリで履歴を含めるかどうかを選べます。現在の状態だけを取得するには `where not _deleted` で絞り込んでください。
