Spark SQL Syntax Overview

  • Last update: August 30, 2024
  • Overview

    Version

    FineDataLink Version

    Functional Change

    3.6.2

    Added a Spark SQL operator to the Data Transformation node to achieve flexible data transformations.

    4.0.17

    Allowed using encryption-related functions and variables in the Spark SQL operator. 

    Allowed using the Spark SQL operator as a data source to input parameters or constants.

    4.1.6.4

    Supported TO_JSON and STRUCT functions.

    Description

    This document introduces the commonly used Spark SQL syntax to help you use the Spark SQL operator for data processing and development.

    iconNote:

    1. For details about the usage of the Spark SQL operator, see Spark SQL.

    2. Processing escape sequences using Spark SQL is not supported currently.

    Index

    Type

    Document

    Commonly used operators and syntax in Spark SQL

    Common Spark SQL Syntax

    Supported conditional functions in Spark SQL

    Spark SQL Conditional Functions

    Supported aggregate functions in Spark SQL

    Spark SQL Aggregate Functions

    Supported window functions in Spark SQL, which can be used to process and calculate grouped data

    Spark SQL Window Functions

    Supported encoding functions in Spark SQL, which can be used to generate Tokens for fetching API data

    Spark SQL Encoding and Encryption Functions

    Supported string functions in Spark SQL, which can be used to process strings

    Spark SQL String Functions

    Date functions in Spark SQL, which can be used to process date data

    Spark SQL Date Functions

    Mathematical functions in Spark SQL, which can be used for mathematical calculations

    Spark SQL Mathematical Functions

    Others

    For details about more functions and usage, see Spark SQL Syntax. (This website is not maintained by the FDL help document team and may be inaccessible sometimes.)

    Notes

    Problem:

    An error occurred when the query statement SELECT split('apple,banana,orange', ',') FROM $[DB table input] was used in the Spark SQL operator, indicating "Unknown data type:array - Unknown data type:array."

    Cause:

    Spark SQL supports the calculation of array-type data, but cannot be used to output array-type data.

    附件列表


    主题: Data Development - Scheduled Task
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy