View a markdown version of this page

Fonctionnalités SQL pour des contrôles d'agrégation et de comparaison minimaux - AWS Clean Rooms

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

Fonctionnalités SQL pour des contrôles d'agrégation et de comparaison minimaux

Le tableau suivant répertorie les constructions et fonctions SQL prises en charge et non prises en charge lorsqu'une règle d'analyse personnalisée utilise des seuils d'agrégation et des contrôles de comparaison minimaux dans le moteur d'analyse Spark. Les catégories de fonctions suivent la référence AWS Clean Rooms Spark SQL.

Catégorie Construction SQL Pris en charge Expressions de table communes (CTE) Clause SELECT finale
Constructions de requêtes
  • CACHE TABLE

  • Indicateurs de requête

  • Modèle d'analyse (requêtes paramétrées)

Oui Pris en charge Pris en charge
Clauses
  • SELECT

  • SELECT DISTINCT

  • FROM

  • FROMSOUS-REQUÊTE

  • FROMTABLEAU EN LIGNE (VALEURS)

  • WHERE

  • GROUP BY

  • HAVING

  • ORDER BY

  • WITH(CET)

Oui Pris en charge Pris en charge
  • GROUP BY CUBE

  • GROUP BY ROLLUP

  • GROUP BY GROUPING SETS

  • EXISTS

  • CLUSTER BY

  • DISTRIBUTE BY

  • SORT BY

  • LATERAL JOIN

  • PIVOT / UNPIVOT

  • WITH RECURSIVE

Non
Clauses d'adhésion
  • JOIN INNER

  • JOIN LEFT

  • JOIN FULL OUTER

  • JOIN CROSS

  • JOIN RIGHT

  • JOIN NATURAL

Oui Pris en charge Pris en charge
  • JOIN LEFT SEMI

  • JOIN LEFT ANTI

Non
Régler les opérateurs
  • UNION

  • UNION ALL

Oui Pris en charge Pris en charge
  • EXCEPT

  • EXCEPT ALL

  • INTERSECT

  • INTERSECT ALL

Non
Limites de tri et de lignes
  • ORDER BYASC/DESC

  • ORDER BYLES VALEURS NULLES D'ABORD

  • ORDER BYLES VALEURS NULLES SONT LES DERNIÈRES

  • LIMIT

Oui Pris en charge Pris en charge
  • OFFSET

Non
Conditions
  • =

  • != / <>

  • <

  • <=

  • >

  • >=

  • IN

  • NOT IN

  • LIKE

  • NOT LIKE

  • RLIKE

  • BETWEEN

  • IS TRUE / IS FALSE

  • AND

  • OR

  • NOT

  • IS DISTINCT FROM

Oui Pris en charge Pris en charge
  • <=> (égalité null-safe)

Non
Fonctions d’agrégation
  • Fonction AVG

  • Fonction COUNT

  • Fonction COUNT DISTINCT

  • Fonction SUM

  • Fonction MIN

  • Fonction MAX

  • STDDEV/STDDEV_SAMPfonctions

  • Fonction STDDEV_POP

  • VAR_SAMP/VARIANCEfonctions

  • Fonction VAR_POP

  • Fonction SKEWNESS

  • Fonction APPROX_COUNT_DISTINCT

  • Fonction COLLECT_LIST

  • Fonction COLLECT_SET

  • Fonction PERCENTILE

  • Fonction APPROX_PERCENTILE

  • Fonction MEDIAN

Oui Pris en charge

Lorsqu'un seuil d'agrégation est défini : MINMAX,PERCENTILE,APPROX_PERCENTILE, MEDIANCOLLECT_LIST, et COLLECT_SET doit être combiné à une agrégation qualifiante (AVG,COUNT,SUM). Ils ne peuvent pas être utilisés comme agrégation autonome.

Lorsque seuls les contrôles de comparaison sont définis : aucune restriction de ce type.

Toutes les autres fonctions d'agrégation sont prises en charge.

  • Fonction ANY_VALUE

  • Fonction BOOL_AND

  • Fonction BOOL_OR

Non
Fonctions de tableau
  • Fonction ARRAY

  • Fonction ARRAY_CONTAINS

  • Fonction ARRAY_DISTINCT

  • Fonction ARRAY_INTERSECT

  • Fonction ARRAY_JOIN

  • Fonction ARRAY_REMOVE

  • Fonction ARRAY_SORT

  • Fonction ARRAY_UNION

  • Fonction FLATTEN

  • Fonction EXPLODE

Oui Pris en charge Pris en charge
  • Fonction ARRAY_EXCEPT

Non
Expressions conditionnelles
  • Fonction IS NULL

  • Fonction IS NOT NULL

  • Fonction GREATEST

  • Fonction LEAST

  • CASE/WHENfonctions

  • Fonction IF

  • Fonction COALESCE

  • Fonction NULLIF

  • Fonction NVL

  • Fonction NVL2

Oui Pris en charge Pris en charge
Fonctions de constructeur
  • Fonction STRUCT

  • Fonction NAMED_STRUCT

  • Fonction MAP

Oui Pris en charge Pris en charge
Fonctions de formatage des types de données
  • Fonction STR_TO_MAP

  • Fonction BASE64

  • Fonction UNBASE64

  • Fonction HEX

  • Fonction UNHEX

  • Fonction TO_DATE

  • Fonction DECODE

  • Fonction ENCODE

  • Fonction CAST

Oui Pris en charge Pris en charge
  • Fonction TO_CHAR

  • Fonction TO_NUMBER

Non
Fonctions de date et d’heure
  • Fonction CURRENT_DATE

  • Fonction CURRENT_TIMESTAMP

  • Fonction TO_TIMESTAMP

  • Fonction DATE_DIFF

  • Fonction DATE_TRUNC

  • Fonction DATE_PART

  • Fonction EXTRACT

  • Fonction CONVERT_TIMEZONE

  • Fonction FROM_UTC_TIMESTAMP

  • Fonction TIMESTAMP

  • DAY/DAYOFMONTHfonctions

  • Fonction DAYOFWEEK

  • Fonction WEEKOFYEAR

  • Fonction MONTH

  • Fonction YEAR

  • Fonction HOUR

  • Fonction MINUTE

  • Fonction SECOND

Oui Pris en charge Pris en charge
  • Fonction DAYOFYEAR

  • Fonction DATE_ADD

  • Fonction ADD_MONTHS

Non
Fonctions de hachage
  • Fonction MD5

  • Fonction SHA

  • Fonction SHA1

  • Fonction SHA2

  • Fonction XXHASH64

Oui Pris en charge Pris en charge
Fonctions JSON
  • Fonction GET_JSON_OBJECT

  • Fonction TO_JSON

Oui Pris en charge Pris en charge
Fonctions mathématiques
  • Fonction ABS

  • CEIL/CEILINGfonctions

  • Fonction FLOOR

  • Fonction ROUND

  • Fonction LN

  • LOG/LOG10fonctions

  • Fonction POWER

  • Fonction SQRT

  • RAND/RANDOMfonctions

  • Fonction EXP

  • Fonction SIGN

  • Fonction TRUNC

Oui Pris en charge Pris en charge
  • Fonction TRUNCATE

  • Fonction CBRT

  • Fonction PI

  • Fonction RADIANS

  • Fonction ACOS

  • Fonction ASIN

  • Fonction ATAN

  • Fonction ATAN2

  • Fonction COS

  • Fonction COT

  • Fonction SIN

  • Fonction DEGREES

Non
Symboles d’opérateurs mathématiques
  • +

  • -

  • *

  • /

  • %

Oui Pris en charge Pris en charge
Fonctions scalaires
  • Fonction CARDINALITY

  • Fonction SIZE

Oui Pris en charge Pris en charge
Fonctions de chaîne
  • Fonction CONCAT

  • Fonction LOWER

  • Fonction UPPER

  • LENGTH/CHAR_LENGTH/CHARACTER_LENGTHfonctions

  • SUBSTR/SUBSTRINGfonctions

  • Fonction TRIM

  • Fonction BTRIM

  • Fonction LTRIM

  • Fonction RTRIM

  • Fonction POSITION

  • Fonction REPLACE

  • Fonction REPEAT

  • Fonction REGEXP_REPLACE

  • Fonction REGEXP_SUBSTR

  • Fonction SPLIT

  • Fonction FORMAT_STRING

  • Fonction UUID

  • Fonction LPAD

  • Fonction RPAD

  • Fonction LEFT

  • Fonction RIGHT

Oui Pris en charge Pris en charge
  • Fonction REVERSE

  • Fonction TRANSLATE

  • Fonction REGEXP_COUNT

  • Fonction REGEXP_INSTR

  • Fonction SPLIT_PART

Non
Privacy-related fonctions
  • Fonction consent_tcf_v2_decode

  • Fonction consent_gpp_v1_decode

Oui Pris en charge Pris en charge
Fonctions de fenêtrage
  • Fonction ROW_NUMBER

  • Fonction RANK

  • Fonction DENSE_RANK

  • Fonction LAG

  • Fonction LEAD

  • AVGFonction de fenêtre

  • COUNTFonction de fenêtre

  • SUMFonction de fenêtre

  • MINFonction de fenêtre

  • MAXFonction de fenêtre

  • STDDEV_POPFonction de fenêtre

  • STDDEV_SAMPFonction de fenêtre

  • VAR_POPFonction de fenêtre

  • VAR_SAMPFonction de fenêtre

  • SKEWNESSFonction de fenêtre

  • APPROX_COUNT_DISTINCTFonction de fenêtre

  • APPROX_PERCENTILEFonction de fenêtre

  • PERCENTILEFonction de fenêtre

Oui Pris en charge

Lorsqu'un seuil d'agrégation est défini : LAGLEAD, WindowMIN, Window MAXAPPROX_PERCENTILE, Window et Window PERCENTILE doivent être combinés à une agrégation éligible. Elles ne peuvent pas être utilisées comme valeur autonome.

Lorsque seuls les contrôles de comparaison sont définis : aucune restriction de ce type.

Toutes les autres fonctions de la fenêtre sont prises en charge.

  • FIRST/FIRST_VALUEfonctions

  • LAST/LAST_VALUEfonctions

  • Fonction NTH_VALUE

  • Fonction CUME_DIST

  • Fonction PERCENT_RANK

  • Fonction NTILE

Non
Fonctions de chiffrement et de déchiffrement
  • Fonction AES_ENCRYPT

  • Fonction AES_DECRYPT

Non
Fonctions d'hyperlog
  • Fonction HLL_SKETCH_AGG

  • Fonction HLL_UNION_AGG

  • Fonction HLL_SKETCH_ESTIMATE

  • Fonction HLL_UNION

Non