

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Lettura da entità di Slack
<a name="slack-reading-from-entities"></a>

 **Prerequisiti** 
+  Un oggetto di Slack da cui si desidera leggere. 

 **Entità supportate** 


| Entità | Può essere Filtrato | Supporta Limite | Supporta Ordina per | Supporta Seleziona \$1 | Supporta Partizionamento | 
| --- | --- | --- | --- | --- | --- | 
| conversations | Sì  | Sì | No | Sì | Sì | 

 **Esempio** 

```
slack_read = glueContext.create_dynamic_frame.from_options(
    connection_type="slack",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "conversations/C058W38R5J8"
    }
)
```

 **Dettagli dell'entità e del campo di Slack** 


| Entità | Campo | Tipo di dati | Operatori supportati | 
| --- | --- | --- | --- | 
| conversations | attachments | List | N/A | 
| conversations | bot\$1id | Stringa | N/A | 
| conversations | blocks | List | N/A | 
| conversations | client\$1msg\$1id | Stringa | N/A | 
| conversations | is\$1starred | Booleano | N/A | 
| conversations | last\$1read | Stringa | N/A | 
| conversations | latest\$1reply | Stringa | N/A | 
| conversations | reactions | List | N/A | 
| conversations | replies | List | N/A | 
| conversations | reply\$1count | Numero intero | N/A | 
| conversations | reply\$1users | List | N/A | 
| conversations | reply\$1users\$1count | Numero intero | N/A | 
| conversations | subscribed | Booleano | N/A | 
| conversations | subtype | Stringa | N/A | 
| conversations | testo | Stringa | N/A | 
| conversations | team | Stringa | N/A | 
| conversations | thread\$1ts | Stringa | N/A | 
| conversations | ts | Stringa | EQUAL\$1TO, BETWEEN, LESS\$1THAN, LESS\$1THAN\$1OR\$1EQUAL\$1TO, GREATER\$1THAN, GREATER\$1THAN\$1OR\$1EQUAL\$1TO | 
| conversations | tipo | Stringa | N/A | 
| conversations | user | Stringa | N/A | 
| conversations | inviter | Stringa | N/A | 
| conversations | root | Struct | N/A | 
| conversations | is\$1locked | Booleano | N/A | 
| conversations | files | List | N/A | 
| conversations | stanza | Struct | N/A | 
| conversations | caricamento | Booleano | N/A | 
| conversations | display\$1as\$1bot | Booleano | N/A | 
| conversations | channel | Stringa | N/A | 
| conversations | no\$1notifications | Booleano | N/A | 
| conversations | permalink | Stringa | N/A | 
| conversations | pinned\$1to | List | N/A | 
| conversations | pinned\$1info | Struct | N/A | 
| conversations | edited | Struct | N/A | 
| conversations | app\$1id | Stringa | N/A | 
| conversations | bot\$1profile | Struct | N/A | 
| conversations | metadati | Struct | N/A | 

 **Query di partizionamento** 

 Se si desidera utilizzare la simultaneità in Spark, possono essere fornite opzioni Spark `PARTITION_FIELD`, `LOWER_BOUND`, `UPPER_BOUND`, `NUM_PARTITIONS` aggiuntive. Con questi parametri, la query originale viene suddivisa in `NUM_PARTITIONS` query secondarie che possono essere eseguite contemporaneamente dalle attività Spark. 
+  `PARTITION_FIELD`: il nome del campo da utilizzare per partizionare la query. 
+  `LOWER_BOUND`: un valore limite inferiore inclusivo del campo di partizione scelto. 

   Per la data, accettiamo il formato di data di Spark utilizzato nelle query di Spark SQL. Esempio di valore valido: `"2024-07-01T00:00:00.000Z"`. 
+  `UPPER_BOUND`: un valore limite superiore esclusivo del campo di partizione scelto. 
+  `NUM_PARTITIONS`: numero di partizioni. 

 I dettagli di supporto del campo di partizionamento per entità sono riportati nella tabella di seguito. 


| Nome entità | Campo di partizionamento | Tipo di dati | 
| --- | --- | --- | 
| conversations | ts | Stringa | 

 **Esempio** 

```
slack_read = glueContext.create_dynamic_frame.from_options(
    connection_type="slack",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "conversations/C058W38R5J8",
        "PARTITION_FIELD": "ts"
        "LOWER_BOUND": "2022-12-01T00:00:00.000Z"
        "UPPER_BOUND": "2024-09-23T15:00:00.000Z"
        "NUM_PARTITIONS": "2"
    }
)
```