Oracle 18c has been released and comes with many new features and incremental improvements. At the moment it is currently available on the Oracle Cloud and for Oracle Engineered System. We will have to wait until later in the year before we will be able to perform out own installs either on-premises or on our own cloud instances. This will be most likely for Oracle 18.2 or 18.3 release. In the mean time we will have to, more than likely, use the Oracle cloud to play with Oracle. For this you will need a paid cloud account or maybe you have gotten your hands on some free cloud credits. In this blog post we will look at some of the new analytical and analytics features available in Oracle 18c. The new features listed here are not a complete list, but comprise those that will have the most impact for developers and data scientists in their everyday work. Approximate Top-N Query Processing Top-N queries have been introduced in Oracle 12.1c, and additional enhancements came in Oracle 12.2c. With Oracle 18c we have some additional enhancements with APPROX_COUNT and APPROX_SUM functions, which can now be used with APPROX_RANK. The following examples illustrate these new functions. SELECT state, approx_count(*) FROM insur_cust_ltv_sample GROUP BY state HAVING approx_rank(partition by state order by approx_count(*) desc) 'RANDOM_FOREST_MODEL', mining_function => dbms_data_mining.classification, data_table_name => 'MINING_DATA_BUILD_V', case_id_column_name => 'CUST_ID', target_column_name => 'AFFINITY_CARD', settings_table_name => 'rf_settings_table'); END; If you are familiar with using the OAA SQL functions and creating machine learning models, then you will notice that the above code is very similar to what you had to do previously. All that is needed is some small changes to using Random Forests. You can build a Neural Network model in a similar way. Inline External Tables Accessing external tables has been enhanced to allow for inline external table definitions, by allowing the external table to be defined at runtime of the SQL statement. This can remove the need to define an external table as an object in the database. The external table definition is instead defined in the SELECT statement. This following code illustrates how you would define a traditional external table. This external table becomes a persistent object in the database. CREATE TABLE countries_ext ( country_code VARCHAR2(5), country_name VARCHAR2(50), country_language VARCHAR2(50) ) ORGANIZATION EXTERNAL ( TYPE ORACLE_LOADER ACCESS PARAMETERS ( RECORDS DELIMITED BY NEWLINE FIELDS TERMINATED BY ',' MISSING FIELD VALUES ARE NULL ( country_code CHAR(5), country_name CHAR(50), country_language CHAR(50) ) ) LOCATION ('Countries.txt') REJECT LIMIT UNLIMITED ); With an Inline External Table we can bypass the creation of this object in the database and go straight to the external file. The following example illustrates an Inline External Table alternative to the persistent example. SELECT * FROM EXTERNAL ( ( country_code CHAR(5), country_name CHAR(50), country_language CHAR(50) ) TYPE ORACLE_LOADER ACCESS PARAMETERS ( RECORDS DELIMITED BY NEWLINE FIELDS TERMINATED BY ',' MISSING FIELD VALUES ARE NULL ) LOCATION ( 'Countries.txt' ) REJECT LIMIT UNLIMITED) sales_external; The new features listed in this post are a subset of all the new features available in Oracle 18c. But the new features listed here will be of most interest to those focused on analytics and data science. To give Oracle 18c a try, and to test out the new features, you will need to go to cloud.oracle.com and select Database from the dropdown list from the Platform menu. Yes, you are going to need an Oracle Cloud account and some money or some free credit. Go and get some free cloud credits at the upcoming Oracle Code events . If you want a 'free' way of trying out Oracle 18c, you can use Oracle Live SQL . They have set up some examples of the new features for you to try.
↧