# Small-Sized Partners

Small-sized partners have manageable subscriber bases and one or two managed packages. A small partner’s total daily usage data across all managed packages is 5 GB or less. Also, small partner’s queries complete well under the 15-minute processing time limit.

| Required Editions                                                                        |
| ---------------------------------------------------------------------------------------- |
| Available in: both Salesforce Classic and Lightning Experience                           |
| Available in: **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions |

Given how manageable smaller partners’ data is, after you run your regular queries one time, we recommend that you run a daily catch-up query as your main query. Sweep in all data for all your managed packages for the last 30 days.

| Data Type               | How to Get Started                                                                              | How to Schedule Catch-Up Queries                                                                                                                                                                                                                                                                                                             |
| ----------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Subscriber Snapshots    | An initial query to retrieve data from when App Analytics was enabled for your managed package. | <ul><li>One daily catch-up query.</li><li>Set `AvailableSince` to the day and time your last regular query ran.</li><li>Set `StartTime` to 30 days ago.</li><li>Omit `EndTime`.</li><li>Each day advance `StartTime` and `AvailableSince` by 1 day.</li></ul>                                                                                |
| Package Usage Summaries | An initial query to retrieve data from when App Analytics was enabled for your managed package. | <ul><li>One daily catch-up query.</li><li>Set `AvailableSince` to the day and time your last regular query ran.</li><li>Set `StartTime` to the first of the previous month.</li><li>Omit `EndTime`.</li><li>Each day advance `AvailableSince` by 1 day.</li><li>Each month advance `StartTime` to the first of the previous month.</li></ul> |
| Package Usage Logs      | An initial query to retrieve data from when App Analytics was enabled for your managed package. | <ul><li>One daily catch-up query.</li><li>Set `AvailableSince` to the day and time your last regular query ran.</li><li>Set `StartTime` to 30 days ago.</li><li>Omit `EndTime`.</li><li>Each day advance `StartTime` and `AvailableSince` by 1 day.</li></ul>                                                                                |

## Example

Most of your customers use your package on an NA or EU instance, so you run your queries at `18:00 UTC`. You have a couple customers on an AP instance, so you create catch-up queries to ensure that you capture data from around the world.

- On March 31 at `18:00 UTC`, run your regular queries.

  Subscriber Snapshot

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=SubscriberSnapshot
  FileType=csv
  FileCompression=gzip
  StartTime=2020-03-30T00:00:00Z
  EndTime=2020-03-31T00:00:00Z"
  ```

  Package Usage Summary

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=PackageUsageSummary
  FileType=csv
  FileCompression=gzip
  StartTime=2020-02-01T00:00:00Z
  EndTime=2020-03-01T00:00:00Z"

  ```

  Package Usage Log

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=PackageUsageLog
  FileType=csv
  FileCompression=gzip
  StartTime=2020-03-30T00:00:00Z
  EndTime=2020-03-31T00:00:00Z"
  ```

- On April 1 at `18:00 UTC` run these three catch-up queries.

  Subscriber Snapshot Catch-Up Query

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=SubscriberSnapshot
  FileType=csv
  FileCompression=gzip
  StartTime=2020-03-02T00:00:00Z
  AvailableSince=2020-03-31T18:00:00Z"
  ```

  Package Usage Summary Catch-Up Query

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=PackageUsageSummary
  FileType=csv
  FileCompression=gzip
  StartTime=2020-03-01T00:00:00Z
  AvailableSince=2020-03-31T18:00:00Z"
  ```

  Package Usage Log Catch-Up Query

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=PackageUsageLog
  FileType=csv
  FileCompression=gzip
  StartTime=2020-03-02T00:00:00Z
  AvailableSince=2020-03-31T18:00:00Z"
  ```

- On April 2 at `18:00 UTC`, run the same catch-up queries, but advance the subscriber snapshot and package usage log `AvailableSince` and `StartTime` date by 1 day each. Advance the package usage summary `AvailableSince` by 1 day.

  Subscriber Snapshot Catch-Up Query

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=SubscriberSnapshot
  FileType=csv
  FileCompression=gzip
  StartTime=2020-03-03T00:00:00Z
  AvailableSince=2020-04-01T18:00:00Z"
  ```

  Package Usage Summary Catch-Up Query

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=PackageUsageSummary
  FileType=csv
  FileCompression=gzip
  StartTime=2020-03-01T00:00:00Z
  AvailableSince=2020-04-01T18:00:00Z"
  ```

  Package Usage Log Catch-Up Query

  ```nolang
  sf data create record
  --sobjecttype AppAnalyticsQueryRequest
  --values "DataType=PackageUsageLog
  FileType=csv
  FileCompression=gzip
  StartTime=2020-03-03T00:00:00Z
  AvailableSince=2020-04-01T18:00:00Z"
  ```
