Development Process Using Aura SQL
After selecting the SQL development mode, you can use Aura to develop jobs according to the following process.
Step 1: Select a Table Storage Format
Before creating a table, you need to determine its storage format. Aura supports storage formats such as ORC, PARQUET, ICEBERG, and LANCE. Among these, ICEBERG and LANCE are the primary capabilities for data lake storage integration.
| Table Type | Positioning | Key Capability |
|---|---|---|
| ORC | Default general format | Columnar storage and partitioning. |
| Parquet | General columnar format | Columnar storage and partitioning. |
| Iceberg | Open table format (lakehouse) | Massive data (PB-level), ACID transactions, snapshots, time travel, expression partitioning, and table-level ALTER operations. |
| Lance | AI-oriented columnar format | High-performance columnar storage, vector indexing, online query, and AI/embedding scenarios. |
| Text/CSV | Data import and export | Only basic import and export are supported. Advanced functions such as partitioning and ANALYZE are not supported. Therefore, this format is not recommended as a storage medium. |
Apache Iceberg is an open table format designed for massive analytic datasets. It adds table functionality to compute engines through a high-performance table format and is used in exactly the same way as SQL tables.
Iceberg is designed for ultra-large tables and is widely deployed in production environments. A single table can contain tens of petabytes of data, and even at this scale, data can be read without a distributed SQL engine.
For more information about SQL on Iceberg, see Iceberg Functions.
Lance is a high-performance columnar data storage format built on the Apache Arrow ecosystem. Developed primarily by the LanceDB team, it aims to achieve data access performance close to that of the Arrow in-memory format, while also supporting transaction management, indexing, and incremental updates.
Lance is suitable not only for offline batch processing and analysis, but also for online query, vector search, and AI applications. It is a new storage format designed for AI and data lake convergence scenarios.
For more information about SQL on Lance, see Lance Functions.
Step 2: Design Database Objects
Before creating objects, you are advised to design and plan database objects as follows:
- Understand Aura database objects: Be familiar with the database object types supported by Aura and their relationships.
- Plan schemas: Schemas are used to logically organize objects and data in a database, allowing multiple users to use the same database without interfering with each other.
- Design table structures: Determine the columns, types, and constraints of tables.
- Design partitioning policies: Plan partitioning modes for large tables to improve query performance.
For details, see Designing Database Objects.
Step 3: Configure Permissions
Before creating and accessing objects, you need to configure users, roles, and object permissions to ensure that users have the corresponding operation permissions:
- Understand the Aura permission model.
- Create and manage users.
- Authorize objects, cancel authorization, and manage roles.
Permission management is typically performed by administrators. Developers can use the pg_show_* series functions to query the permission status.
For details, see User and Permissions Management.
Step 4: Create Database Objects
After the design and authorization are complete, use DDL statements to create required database objects:
- Create a schema: CREATE SCHEMA.
- Create a table, including specifying the table format, partition, and table properties: CREATE TABLE.
- Create a view, function, model, and index: CREATE VIEW, CREATE FUNCTION, CREATE MODEL and CREATE INDEX.
- Create a role: CREATE ROLE.
For details, see DDL Syntax.
Step 5: Operate Data
Use DML statements to add, delete, modify, merge, and optimize data in tables:
- Insert data: INSERT.
- Update data: UPDATE.
- Delete data: DELETE.
- Merge data (Iceberg tables): MERGE INTO.
- Optimize small files (Iceberg tables): OPTIMIZE.
For details, see DML Syntax.
Step 6: Query Data
Use DQL statements to query data:
- Single-table query: SELECT (filtering), WHERE (filtering), ORDER BY (sorting), LIMIT (limiting), and GROUP BY (aggregation).
- Multi-Table join query: INNER JOIN (INNER/CROSS/NATURAL) and OUTER JOIN (LEFT/RIGHT/FULL).
- Complex query: WITH expressions.
For details, see DQL Syntax.
Step 7: Use Functions and Data Types
During development, you need to understand the data type system and available functions of Aura.
- For details about data types and their mapping to LakeFormation, see Data Type.
- For details about the conversion rules between types, see Type Conversion.
- For details about how to compile expressions, see Expression.
- For details about functions and operators (character, number, time and date, JSON, aggregation, window, Iceberg table service, and foundation model inference), see Functions and Operators.
- For details about how to avoid using keywords in naming, see Keywords.
Step 8: Tune Performance
If the query performance does not meet the expectation, analyze the execution plan, locate the bottleneck, and adjust the engine behavior by setting GUC parameters.
- For details about the tuning process, execution monitoring, execution plan analysis, plan hints, and tuning cases, see Performance Tuning.
- For details about the values and functions of each parameter, see GUC Parameters.
Syntax Text Conventions
To facilitate the understanding of syntax usage, the syntax text in this document is presented in the following format:
During development, you are advised to use case-insensitive formats where possible. You are advised to use lowercase letters consistently for database object names (such as table names, column names, function names, field names, etc.). Avoid inconsistent casing for the same object in different locations to prevent errors such as "object not found" caused by identifier case sensitivity.
| Format | Description |
|---|---|
| UPPERCASE | Keywords (parts of the statement that remain unchanged) are in uppercase. |
| lowercase | Parameters (parts of the statement to be replaced with actual values) are in lowercase. |
| [ ] | Content within square brackets ([ ]) is optional. |
| ... | Preceding elements may repeat. |
| [ x | y | ... ] | Select one or none from two or more options. |
| { x | y | ... } | Select one from two or more options. |
| [x | y | ... ] [ ... ] | Select multiple parameters or none. If multiple, separate them with spaces. |
| [ x | y | ... ] [ ,... ] | Select multiple parameters or none. If multiple, separate them with commas (,). |
| { x | y | ... } [ ... ] | Select multiple parameters, at least one. If multiple, separate them with spaces. |
| { x | y | ... } [ ,... ] | Select multiple parameters, at least one. If multiple, separate them with commas (,). |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot