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

Ingest a Parquet file with BULK INSERT

This example demonstrates how to:

  • Create a FeatureBase table with a required structure
  • Copy and transform data from an parquet source
  • Use the BULK INSERT statement to copy data from the source to the target table.

Before you begin

Cloud users:

Community users:

Step 1: create table

CREATE TABLE sample (
    _id id,
    x int,
    y decimal(4)
);

Step 2: ingest data

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

Step 3: query the data

SELECT TOP(10) * FROM sample;

Further information