DESCRIBE STAGE¶
Décrit les valeurs spécifiées pour les propriétés dans une zone de préparation (format de fichier, copie et emplacement), ainsi que les valeurs par défaut de chaque propriété.
DESCRIBE peut être abrégé en DESC.
- Voir aussi :
Syntaxe¶
DESC[RIBE] STAGE <name>
Paramètres¶
nameIndique l’identificateur de la zone de préparation à décrire. Si l’identificateur contient des espaces ou des caractères spéciaux, toute la chaîne doit être délimitée par des guillemets doubles. Les identificateurs entre guillemets doubles sont également sensibles à la casse.
Notes sur l’utilisation¶
Pour post-traiter la sortie de cette commande, vous pouvez utiliser la syntaxe opérateur de canal (
->>) ou la fonction RESULT_SCAN. Les deux constructions traitent la sortie comme un jeu de résultats que vous pouvez interroger.For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.
When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column
type, specifySELECT "type".You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.
Sortie¶
La sortie de commande fournit les propriétés des zones de préparation et les métadonnées dans les colonnes suivantes.
Colonne |
Description |
|---|---|
|
Propriété parentale à laquelle appartient chaque propriété de la zone de préparation. Les valeurs possibles incluent STAGE_FILE_FORMAT, STAGE_COPY_OPTIONS, STAGE_LOCATION, STAGE_CREDENTIALS et DIRECTORY. |
|
Nom de la propriété. Pour les descriptions des propriétés, reportez-vous à CREATE STAGE. |
|
Type de propriété. |
|
Valeur attribuée à la propriété. |
|
Valeur par défaut de la propriété. |
Note
Pour les zones de préparation avec une table de répertoire, la sortie comprend une propriété nommée LAST_REFRESHED_ON de type TIMESTAMP. LAST_REFRESHED_ON indique le moment de la dernière synchronisation des métadonnées de la table de répertoire avec les fichiers associés sur la zone de préparation, soit manuellement, soit automatiquement.
Exemples¶
Décrivez une zone de préparation interne nommée my_s3_stage :
DESC STAGE my_s3_stage; +--------------------+--------------------------------+---------------+-------------------------------------------------------+------------------+ | parent_property | property | property_type | property_value | property_default | |--------------------+--------------------------------+---------------+-------------------------------------------------------+------------------| | STAGE_FILE_FORMAT | TYPE | String | CSV | CSV | | STAGE_FILE_FORMAT | RECORD_DELIMITER | String | \n | \n | | STAGE_FILE_FORMAT | FIELD_DELIMITER | String | , | , | | STAGE_FILE_FORMAT | FILE_EXTENSION | String | | | | STAGE_FILE_FORMAT | SKIP_HEADER | Integer | 0 | 0 | | STAGE_FILE_FORMAT | DATE_FORMAT | String | AUTO | AUTO | | STAGE_FILE_FORMAT | TIME_FORMAT | String | AUTO | AUTO | | STAGE_FILE_FORMAT | TIMESTAMP_FORMAT | String | AUTO | AUTO | | STAGE_FILE_FORMAT | BINARY_FORMAT | String | HEX | HEX | | STAGE_FILE_FORMAT | ESCAPE | String | NONE | NONE | | STAGE_FILE_FORMAT | ESCAPE_UNENCLOSED_FIELD | String | \\ | \\ | | STAGE_FILE_FORMAT | TRIM_SPACE | Boolean | false | false | | STAGE_FILE_FORMAT | FIELD_OPTIONALLY_ENCLOSED_BY | String | NONE | NONE | | STAGE_FILE_FORMAT | NULL_IF | List | [\\N] | [\\N] | | STAGE_FILE_FORMAT | COMPRESSION | String | AUTO | AUTO | | STAGE_FILE_FORMAT | ERROR_ON_COLUMN_COUNT_MISMATCH | Boolean | true | true | | STAGE_FILE_FORMAT | VALIDATE_UTF8 | Boolean | true | true | | STAGE_FILE_FORMAT | SKIP_BLANK_LINES | Boolean | false | false | | STAGE_FILE_FORMAT | REPLACE_INVALID_CHARACTERS | Boolean | false | false | | STAGE_FILE_FORMAT | EMPTY_FIELD_AS_NULL | Boolean | true | true | | STAGE_FILE_FORMAT | SKIP_BYTE_ORDER_MARK | Boolean | true | true | | STAGE_FILE_FORMAT | ENCODING | String | UTF8 | UTF8 | | STAGE_COPY_OPTIONS | ON_ERROR | String | ABORT_STATEMENT | ABORT_STATEMENT | | STAGE_COPY_OPTIONS | SIZE_LIMIT | Long | | | | STAGE_COPY_OPTIONS | PURGE | Boolean | false | false | | STAGE_COPY_OPTIONS | RETURN_FAILED_ONLY | Boolean | false | false | | STAGE_COPY_OPTIONS | ENFORCE_LENGTH | Boolean | true | true | | STAGE_COPY_OPTIONS | TRUNCATECOLUMNS | Boolean | false | false | | STAGE_COPY_OPTIONS | FORCE | Boolean | false | false | | STAGE_LOCATION | URL | String | ["s3://EXAMPLE-S3-PATH/my-csvfiles/"] | | | STAGE_CREDENTIALS | AWS_KEY_ID | String | | | | DIRECTORY | LAST_REFRESHED_ON | Timestamp | 2023-05-03 12:50:28.000 -0700 | | | DIRECTORY | ENABLE | Boolean | true | false | | DIRECTORY | AUTO_REFRESH | Boolean | false | false | +--------------------+--------------------------------+---------------+-------------------------------------------------------+------------------+