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

BULK INSERT example using Apache Parquet formatted data source

This BULK INSERT statement:

  • reads data from an Apache Parquet formatted data source found in a destination URL
  • maps data to destination table columns found in parquet-target table
  • inserts the data

Before you begin

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

BULK INSERT statement

BULK INSERT
  INTO parquet-target(
    _id,
    integercol,
    decimalcol
  )
  MAP(
    'id' id,
    'intval' int,
    'decval' decimal(4)
  )
  FROM
    'https://s3.amazonaws.com/todd-scratch.molecula.com/sample.parquet'
  WITH
    FORMAT 'PARQUET'
    INPUT 'URL';

Arguments

Argument Description Additional information
BULK INSERT INTO Insert data to the parquet-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 PARQUET data source  
FROM clause The URL of the PARQUET data source  
WITH clause States the data source TARGET and URL INPUT  

Next step