Exasolution User Manual
Total Page:16
File Type:pdf, Size:1020Kb
The most powerful engine for your analytics! EXASolution User Manual Version 4.2.11 Copyright © 2014 EXASOL AG. All rights reserved. The information in this publication is subject to change without notice. EXASOL SHALL NOT BE HELD LIABLE FOR TECHNICAL OR EDITORIAL ERRORS OR OMISSIONS CONTAINED HEREIN NOR FOR ACCIDENTAL OR CONSEQUENTIAL DAMAGES RES- ULTING FROM THE FURNISHING, PERFORMANCE, OR USE OF. No part of this publication may be photocopied or reproduced in any form without prior written consent from EXASOL. All named trademarks and registered trademarks are the property of their respective owners. EXASolution User Manual Table of Contents Foreword ..................................................................................................................................... ix Conventions ................................................................................................................................. xi Changes in Version 4.2 ................................................................................................................. xiii 1. What is EXASolution? ................................................................................................................. 1 2. SQL reference ............................................................................................................................ 5 2.1. Basic language elements .................................................................................................... 5 2.1.1. Comments in SQL ................................................................................................. 5 2.1.2. SQL identi®er ....................................................................................................... 5 2.1.3. Regular expressions ............................................................................................... 7 2.2. SQL statements .............................................................................................................. 11 2.2.1. De®nition of the database (DDL) ............................................................................ 12 2.2.2. Manipulation of the database (DML) ....................................................................... 33 2.2.3. Access control using SQL (DCL) ............................................................................ 53 2.2.4. Query language (DQL) ......................................................................................... 65 2.2.5. Veri®cation of the data quality ................................................................................ 73 2.2.6. Other statements .................................................................................................. 78 2.3. Data types ..................................................................................................................... 91 2.3.1. Overview of EXASolution data types ....................................................................... 92 2.3.2. Data type details .................................................................................................. 92 2.3.3. Data type aliases .................................................................................................. 95 2.3.4. Type conversion rules ........................................................................................... 96 2.3.5. Default values ..................................................................................................... 98 2.3.6. Identity columns ................................................................................................ 100 2.4. Literals ....................................................................................................................... 101 2.4.1. Numeric literals ................................................................................................. 102 2.4.2. Boolean literals .................................................................................................. 103 2.4.3. Date/Time literals ............................................................................................... 103 2.4.4. Interval literals ................................................................................................... 103 2.4.5. String literals ..................................................................................................... 105 2.4.6. NULL literal ..................................................................................................... 105 2.5. Format models ............................................................................................................. 105 2.5.1. Date/Time format models ..................................................................................... 106 2.5.2. Numeric format models ....................................................................................... 108 2.6. Operators .................................................................................................................... 110 2.6.1. Arithmetic Operators ........................................................................................... 111 2.6.2. Concatenation operator || ...................................................................................... 112 2.7. Predicates .................................................................................................................... 112 2.7.1. Introduction ...................................................................................................... 113 2.7.2. List of predicates ................................................................................................ 113 2.8. Built-in functions .......................................................................................................... 118 2.8.1. Scalar functions ................................................................................................. 119 2.8.2. Aggregate functions ............................................................................................ 122 2.8.3. Analytical functions ............................................................................................ 123 2.8.4. Alphabetical list of all functions ............................................................................ 125 2.9. Geospatial data ............................................................................................................. 228 2.9.1. Geospatial objects .............................................................................................. 229 2.9.2. Geospatial functions ........................................................................................... 230 2.10. EXAPowerlytics ........................................................................................................ 232 2.10.1. What is EXAPowerlytics? .................................................................................. 233 2.10.2. Introducing examples ........................................................................................ 234 2.10.3. Details for different languages ............................................................................. 237 2.10.4. External Scripts (eUDF) ..................................................................................... 246 2.10.5. Hadoop Integration Service ................................................................................ 249 2.11. Scripting .................................................................................................................... 251 2.11.1. Introduction ..................................................................................................... 252 iii 2.11.2. General script language ...................................................................................... 253 2.11.3. Database interaction .......................................................................................... 260 2.11.4. Libraries ......................................................................................................... 267 2.11.5. System tables ................................................................................................... 274 3. Concepts ................................................................................................................................ 275 3.1. Transaction management ............................................................................................... 275 3.1.1. Basic concept .................................................................................................... 275 3.1.2. Differences to other systems ................................................................................. 276 3.1.3. Recommendations for the user .............................................................................. 276 3.2. Rights management ....................................................................................................... 276 3.2.1. User ................................................................................................................. 277 3.2.2. Roles ............................................................................................................... 277 3.2.3. Privileges .......................................................................................................... 278 3.2.4. Access control with SQL statements ....................................................................... 278 3.2.5. Meta information on rights management ................................................................. 279 3.2.6. Rights management