Documentazione Invantiveparte di invantive cloud
Forum di supporto InvantiveAccedi / Registrati

Tabella HTML (htmlTable)

Scopo

I dati memorizzati con perdite in formato HTML possono essere interpretati come origine dati usando la parola chiave htmltable.

L'espressione specifica un percorso principale nel cui contesto le righe vengono valutate usando le specifiche delle colonne.

L'opzione passing specifica l'origine dei dati in formato HTML. L'origine è spesso il risultato di una funzione tabella read_file() o di un download URL tramite httpdownload(). La piena aderenza al formato HTML non è richiesta; il parser corregge spesso automaticamente molti errori di formato HTML.

Le colonne sono specificate tramite il loro percorso relativo al percorso principale.

--
-- 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

Sintassi

%%{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))

Scopo

Un elenco di specifiche di colonne di tabella 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))

Scopo

Ogni colonna della tabella HTML viene mappata a una colonna dell'origine dati tramite il percorso relativo al percorso principale.