

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# Lesen aus Instagram Ads-Entitäten
<a name="instagram-ads-reading-from-entities"></a>

**Voraussetzung**

Ein Instagram Ads-Objekt, aus dem gelesen werden soll. Sie benötigen den Objektnamen. Die folgenden Tabellen zeigen die unterstützten Entitäten.

**Unterstützte Entitäten für Quelle**:


| Entität | Kann gefiltert werden | Unterstützt Limit | Unterstützt „Sortieren nach“ | Unterstützt „\$1 auswählen“ | Unterstützt Partitionierung | 
| --- | --- | --- | --- | --- | --- | 
| Kampagne | Ja | Ja | Nein | Ja | Ja | 
| Ad Set | Ja | Ja | Nein | Ja | Ja | 
| Ads | Ja | Ja | Nein | Ja | Ja | 
| Ad Creative | Nein | Ja | Nein | Ja | Nein | 
| Insights – Account | Nein | Ja | Nein | Ja | Nein | 
| Ad Image | Ja | Ja | Nein | Ja | Nein | 
| Insights – Ad | Ja | Ja | Nein | Ja | Ja | 
| Einblicke - AdSet | Ja | Ja | Nein | Ja | Ja | 
| Insights – Campaign | Ja | Ja | Nein | Ja | Ja | 

**Beispiel:**

```
instagramAds_read = glueContext.create_dynamic_frame.from_options(
    connection_type="instagramads",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "entityName",
        "API_VERSION": "v20.0"
    }
```

## Entitäts- und Felddetails für Instagram Ads
<a name="instagram-ads-reading-entity-and-field-details"></a>

Weitere Informationen zu den Entitäten und Felddetails finden Sie unter:
+ [Kampagne](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group)
+ [Ad Set](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign)
+ [Ad](https://developers.facebook.com/docs/marketing-api/reference/adgroup)
+ [Ad Creative](https://developers.facebook.com/docs/marketing-api/reference/ad-creative)
+ [Ad Account Insight](https://developers.facebook.com/docs/marketing-api/reference/ad-account/insights)
+ [Ad Image](https://developers.facebook.com/docs/marketing-api/reference/ad-image)
+ [Ad Insights](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights/)
+ [AdSets Einblicke](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/insights)
+ [Campaigns Insights](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group/insights)

Weitere Informationen finden Sie unter [Marketing-API](https://developers.facebook.com/docs/marketing-api/reference/v21.0).

**Anmerkung**  
Die Datentypen Struktur und Liste werden in der Antwort der Connectors in den Datentyp Zeichenfolge konvertiert.

## Partitionierung von Abfragen
<a name="instagram-ads-reading-partitioning-queries"></a>

Sie können die zusätzlichen Spark-Optionen `PARTITION_FIELD`,`LOWER_BOUND`, `UPPER_BOUND` und `NUM_PARTITIONS` angeben, wenn Sie Parallelität in Spark nutzen möchten. Mit diesen Parametern wird die ursprüngliche Abfrage in `NUM_PARTITIONS` Unterabfragen aufgeteilt, die von Spark-Aufgaben gleichzeitig ausgeführt werden können.
+ `PARTITION_FIELD`: der Name des Feldes, das zur Partitionierung der Abfrage verwendet werden soll.
+ `LOWER_BOUND`: ein **inklusiver** Untergrenzwert des ausgewählten Partitionsfelds.

  Für dieses DateTime Feld akzeptieren wir das Spark-Zeitstempelformat, das in Spark-SQL-Abfragen verwendet wird.

  Beispiel für gültigen Wert:

  ```
  "2022-01-01T00:00:00.000Z"
  ```
+ `UPPER_BOUND`: ein **exklusiver Obergrenzwert** des ausgewählten Partitionsfelds.

  Beispiele für gültigen Wert:

  ```
  "2024-01-02T00:00:00.000Z"
  ```
+ `NUM_PARTITIONS`: Die Anzahl an Partitionen.

Beispiel:

```
instagramADs_read = glueContext.create_dynamic_frame.from_options(
    connection_type="instagramads",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "entityName",
        "API_VERSION": "v20.0",
        "PARTITION_FIELD": "created_time"
        "LOWER_BOUND": "2022-01-01T00:00:00.000Z"
        "UPPER_BOUND": "2024-01-02T00:00:00.000Z"
        "NUM_PARTITIONS": "10"
    }
```