Skip to main content Link Menu Expand (external link) Document Search Copy Copied

BULK INSERT example using ORC formatted data source

This BULK INSERT statement:

  • reads data from an ORC formatted data source found in a destination URL
  • maps data to destination table columns found in orc-target table

Before you begin

Run SHOW TABLE <tablename> to learn the structure of a destination table

BULK INSERT statement

BULK INSERT
  INTO orc-target(
    _id,
    stringcol,
    boolcol,
    intcol
  )
  MAP(
    0 id,
    1 STRING,
    2 BOOL,
    3 INT
  )
  FROM
    'https://sample-files-hh.s3.us-east-2.amazonaws.com/samplefile.orc'
  WITH
    FORMAT 'ORC'
    INPUT 'URL';

Arguments

Argument Description Additional information
BULK INSERT INTO Insert data to the orc-target table <column-list> which is required by the MAP clause  
MAP clause A string label that precisely matches the column name in the schema within the ORC data source  
FROM clause The URL for the ORC data source  
WITH clause States the data source FORMAT and URL INPUT  

Next step