Invantive 문서Invantive Cloud의 일부
Invantive 지원 포럼로그인 / 회원가입

TO_ARRAY

구문

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

목적

The TO_ARRAY SQL function splits a text on a separator into an array of texts. The resulting array can currently solely be used with the INTERNETTABLE table function, which accepts an array of texts in three positions: the starting URLs, the sitemap URLs of the sitemap clause and the URLs to exclude of the exclude clause.

SPLIT_PART 및 Internet Table (internetTableSpec)도 참조하십시오.

매개변수:

  • 텍스트(varchar2): 나눌 텍스트.
  • Separator (optional, varchar2): the separator to split the text on. 기본값은 ,입니다.

Returns: the parts of the text as an array of varchar2. Returns null when the text is null or empty.

예시

The following example converts a text with three URLs separated by ### into an array of three texts and retrieves the pages found on these URLs:

select t.*
from   internettable
       ( to_array
         ( 'https://cloud.invantive.com'
           || '###https://cloud.invantive.com/language/nl'
           || '###https://cloud.invantive.com/language/en'
         , '###'
         )
         sitemap 'https://cloud.invantive.com/sitemap.xml'
         max depth 2
       ) t
limit  10

The following example converts a text with two URLs separated by , (the default separator) into an array and excludes these URLs from the pages retrieved:

select t.*
from   internettable
       ( 'https://invantive.com'
         sitemap 'https://www.invantive.com/sitemap.xml'
         exclude to_array('https://invantive.com/privacy/index.html,https://invantive.com/products/index.html')
         stay on site
         max depth 1
       ) t
limit  10