Documentation Invantiveune partie de Invantive cloud
Forums d'Invantive SupportConnectez-vous/inscrivez-vous

Tableau HTML (htmlTable)

Objet

Les données stockées au format HTML peuvent être interprétées comme source de données à l'aide du mot-clé htmltable.

L'expression spécifie un chemin maître dans le contexte duquel les lignes sont évaluées à l'aide des spécifications de colonnes.

L'option passing indique la source des données au format HTML. La source est souvent le résultat d'une fonction de table read_file() ou d'un téléchargement d'URL via httpdownload(). Une conformité totale au format HTML n'est pas requise ; l'analyseur corrige souvent automatiquement de nombreuses erreurs de format HTML.

Les colonnes sont spécifiées à l'aide de leur chemin relatif au chemin principal.

--
-- Retrieve all anchors from a webpage.
--
select htable.*
from   httpdownload@datadictionary('https://www.invantive.com') dld
join   htmltable
( '//a'
passing dld.content_clob
columns href  varchar2 path '@href'
,       rel   varchar2 path '@rel'
,       title varchar2 path '@title'
)
htable

Syntaxe

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart TD
    htmlTableSpec_start((START))
    htmlTableSpec_start --> htmlTableSpec_0_0[HTMLTABLE]:::quoted
    htmlTableSpec_0_0 --> htmlTableSpec_0_1["("]:::quoted
    htmlTableSpec_0_1 --> htmlTableSpec_0_2[htmlTableExpression]
    htmlTableSpec_0_2 --> htmlTableSpec_0_3[htmlTablePassing]
    htmlTableSpec_0_3 --> htmlTableSpec_0_4[htmlTableLiteral]
    htmlTableSpec_0_4 --> htmlTableSpec_0_5[htmlTableColumns]
    htmlTableSpec_0_5 --> htmlTableSpec_0_6[")"]:::quoted
    htmlTableSpec_0_6 --> htmlTableSpec_end((END))

htmlTableLiteral

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    htmlTableLiteral_start((START))
    htmlTableLiteral_start --> htmlTableLiteral_0_0[LITERAL]:::quoted
    htmlTableLiteral_0_0 --> htmlTableLiteral_0_1[<a href="Invantive UniversalSQL/Grammar/Expression" class="internal-link">expression</a>]
    htmlTableLiteral_0_1 --> htmlTableLiteral_end((END))

htmlTablePassing

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> htmlTablePassing
    htmlTablePassing -->| | passingSourceOrPathExpression
    passingSourceOrPathExpression --> End((END))

htmlTableExpression

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> htmlTableExpression
    htmlTableExpression -->| | stringConstant
    stringConstant --> End((END))

htmlTableColumns

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart TD
    htmlTableColumns_start((START))
    htmlTableColumns_start --> htmlTableColumns_0_0["COLUMNS"]:::quoted
    htmlTableColumns_0_0 --> htmlTableColumns_0_1[htmlTableColumnSpec]
    htmlTableColumns_0_1 --> htmlTableColumns_0_2[","]:::quoted
    htmlTableColumns_0_2 --> htmlTableColumns_0_3[htmlTableColumnSpec]
    htmlTableColumns_0_3 --> htmlTableColumns_end((END))

Objet

Liste des spécifications de colonnes de tableau HTML.

htmlTableColumnSpec

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart TD
    htmlTableColumnSpec_start((START))
    htmlTableColumnSpec_start --> htmlTableColumnSpec_0_0[<a href="Invantive UniversalSQL/Grammar/Identifier" class="internal-link">identifier</a>]
    htmlTableColumnSpec_0_0 --> htmlTableColumnSpec_0_1[sqlDataTypeExtended]
    htmlTableColumnSpec_0_1 --> htmlTableColumnSpec_0_2[PATH]:::quoted
    htmlTableColumnSpec_0_2 --> htmlTableColumnSpec_0_3[stringConstant]
    htmlTableColumnSpec_0_3 --> htmlTableColumnSpec_end((END))

Objet

Chaque colonne de tableau HTML est associée à une colonne de la source de données à l'aide du chemin relatif au chemin maître.