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

FeatureBase SQL-guide examples

Supported SQL statements, data-types, expressions, functions and operators are demonstrated in the following examples.

Table of contents

Before you begin

CREATE TABLE examples

–>

INSERT examples

BULK INSERT examples

The following SQL examples demonstrate BULK INSERT using different clauses and data sources.

Statement Target table FROM clause TRANSFORM clause WITH clause
BULK INSERT using CSV data source csv-target URL   * BATCHSIZE
* FORMAT
* INPUT
* HEADER_ROW
BULK INSERT using ndJSON data source ndjson-target URL Includes CAST function * BATCHSIZE
* FORMAT
* INPUT
* ALLOW_MISSING_VALUES
BULK INSERT using ORC data source orc-target URL   * FORMAT
* INPUT
BULK INSERT using Apache Parquet data source parquet-target URL   * FORMAT
* INPUT
BULK INSERT using inline CSV tuple-set-target Inline CSV Combines column values using TUPLE function * FORMAT
* INPUT

SELECT examples

These examples demonstrate SELECT statements that use different clauses, expressions, functions and operators.

Statement Target table SELECT clauses Expressions Functions Operators
SELECT FROM cosvec-target cosvec-target     COSINE DISTANCE  
SELECT FROM csv-target csv-target * COUNT()
* DISTINCT
     
SELECT FROM ndjson-target parquet-target * WHERE
* LIKE
* ORDER BY
     
SELECT FROM orc-target orc-target        
SELECT FROM parquet-target parquet-target * TOP()
* WHERE
    BETWEEN
SELECT FROM tan-target tan-target     TANIMOTO_COEFFICIENT()  
SELECT FROM tuple-set-target parquet-target     DATETIMENAME()