

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 Facebook Ads-Entitäten
<a name="facebook-ads-reading-from-entities"></a>

**Voraussetzung**

Ein Facebook 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 | 
| Adaccounts | 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:**

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

## Facebook Ads-Entitäts- und Felddetails
<a name="facebook-ads-reading-entity-and-field-details"></a>

Weitere Informationen zu den Entitäten und Felddetails finden Sie unter:
+ [Anzeigenkonto](https://developers.facebook.com/docs/marketing-api/reference/ad-account)
+ [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)
+ [Insight Ad Account](https://developers.facebook.com/docs/marketing-api/reference/ad-account/insights)
+ [Insights Ads](https://developers.facebook.com/docs/marketing-api/reference/adgroup/insights/)
+ [Einblicke AdSets](https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/insights)
+ [Insights Campaigns](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="facebook-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-01"
  ```
+ `UPPER_BOUND`: ein **exklusiver** Obergrenzwert des ausgewählten Partitionsfelds.
+ `NUM_PARTITIONS`: Die Anzahl an Partitionen.

Beispiel:

```
FacebookADs_read = glueContext.create_dynamic_frame.from_options(
    connection_type="FacebookAds",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "entityName",
        "API_VERSION": "v20.0",
        "PARTITION_FIELD": "created_time"
        "LOWER_BOUND": "2022-01-01"
        "UPPER_BOUND": "2024-01-02"
        "NUM_PARTITIONS": "10"
    }
```