Help Center/ DataArts Fabric/ Developer Guide/ Querying Data/ SQL on Iceberg/ Accessing Iceberg Tables Created by Third-Party Engines
Updated on 2025-09-18 GMT+08:00

Accessing Iceberg Tables Created by Third-Party Engines

For an Iceberg table generated by Spark, DataArts Fabric SQL accesses Iceberg data on OBS through external tables.

  1. Obtain the corresponding OBS path access permissions.

    Log in to the Huawei Cloud LakeFormation console. In the navigation pane on the left, choose Data Permissions > Data Authorization. On the displayed page, click Authorize. In the dialog box that appears, grant READ/WRITE permissions for the file path to the current IAM user.

  2. Create an external table.

    1
    CREATE EXTERNAL TABLE table_name [column_name type_name,...] location 'fullLocation' store as iceberg;
    

    Here, fullLocation is the complete path of the Iceberg table on OBS. If specifying column names and types, ensure they match the metadata at the file level. If unspecified, the table will be created using the column names and types from the Iceberg metadata at the file level. The mapping between ICEBERG file-level data types and DataArts Fabric data types, along with the required table creation types, is shown in the table below.

    Table 1 Mapping between DataArts Fabric data types and ICEBERG data types

    Type Name

    ICEBERG Data Type

    DataArts Fabric Table Creation Type

    2-byte integer

    INTEGER

    INTEGER

    4-byte integer

    INTEGER

    INTEGER

    8-byte integer

    LONG

    BIGINT

    Single-precision floating point

    FLOAT

    FLOAT4

    Double-precision floating point

    DOUBLE

    FLOAT8

    Scientific data type

    DECIMAL

    DECIMAL[p,s]

    Date

    DATE

    DATE

    Time

    TIMESTAMP

    TIMESTAMP

    Boolean

    BOOLEAN

    BOOLEAN

    Char

    STRING

    TEXT

    VARCHAR

    STRING

    TEXT

    String (large text object)

    STRING

    TEXT