### Example: Start Level 0 Backup Source: https://docs.exasol.com/db/latest/administration/aws/backup_restore/run_manual_backup.htm Example of starting a full (level 0) backup for 'MY_DATABASE' to volume 'r0001' with a 1-week expiration. ```bash confd_client db_backup_start db_name: MY_DATABASE backup_volume_name: r0001 level: 0 expire: '1w' ``` -------------------------------- ### Install Exasol on Cloud Platforms (Quick) Source: https://docs.exasol.com/db/latest/get_started/quick_start_guide.htm Initiate the Exasol Personal installation for your chosen cloud provider using preset commands. This command handles infrastructure provisioning and Exasol setup. ```bash exasol install aws # Amazon Web Services exasol install azure # Microsoft Azure exasol install exoscale # Exoscale ``` -------------------------------- ### Example Installation Error Source: https://docs.exasol.com/db/latest/administration/on-premise/installation/install_as_app/deploy_on_hosts.htm This example shows a typical error message encountered during package extraction. It indicates a failure to create a directory, which needs to be resolved before retrying the installation. ```text INFO[2023-09-02 09:22:44]: Extracting packages... cp: cannot create regular file '/var/lib/ccc/bin/': No such file or directory ``` -------------------------------- ### Monitor Installation Logs Source: https://docs.exasol.com/db/latest/administration/on-premise/installation/install_as_app/deploy_on_hosts.htm Connect to a node via SSH and use this command to monitor the installation process in real-time. This is helpful for diagnosing issues during the setup. ```bash sudo journalctl -f ``` -------------------------------- ### Start Database with confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/db_start.htm Starts an existing database named 'DB1' using the confd_client command-line tool. This is a basic example without optional parameters. ```bash confd_client db_start db_name: DB1 ``` -------------------------------- ### Start Rootless Installation with c4 Source: https://docs.exasol.com/db/latest/administration/on-premise/installation/install_rootless.htm Command to start the Exasol installation with rootless mode enabled via a c4 command-line argument. ```bash ./c4 --ccc-play-rootless true host play -i config ``` -------------------------------- ### Exasol Installation Completion Message Source: https://docs.exasol.com/db/latest/administration/on-premise/installation/install_as_app/deploy_on_hosts.htm This example shows a confirmation message after the Exasol installation has successfully started on remote hosts. It indicates that finalization is in progress and provides information on how to monitor and connect after completion. ```text ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| The final steps of the Exasol installation procedure were successfully started on remote hosts now. It will take yet some time to complete (several minutes). After the installation is finished, you can connect to the Database or COS. During the installation, you can login to the hosts via SSH, and watch the process using: sudo journalctl -f After the installation finished, you can connect to COS using: ssh -p 20002 root@$IP IP addresses of the systems: * 203.0.113.11 * 203.0.113.12 * 203.0.113.13 * 203.0.113.14 Exasol version: 2025.1.0 Exasol package: @exasol-2025.1.0 Happy Exasolling! ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ``` -------------------------------- ### Exasol TIMING Command Example Source: https://docs.exasol.com/db/latest/connect_exasol/sql_clients/exaplus_cli/exaplus_commands/timing.htm Demonstrates starting a named timer, showing all active timers, and then stopping the named timer. ```sql timing start my_timing; timing show; timing stop my_timing; ``` -------------------------------- ### Install Exasol with Presets Source: https://docs.exasol.com/db/latest/get_started/exasol_personal_administration.htm Use the 'exasol install' command with built-in or local presets for infrastructure and installation. Local presets can be specified by path. ```bash exasol install [install-preset] exasol install aws exasol install ./my-preset exasol install ./my-infra ./my-install ``` -------------------------------- ### Install Exasol Personal on Cloud Platforms Source: https://docs.exasol.com/db/latest/get_started/exasol_personal_administration.htm Initiate the Exasol Personal installation on your chosen cloud provider. This command provisions infrastructure, installs Exasol, and configures the database. ```bash exasol install aws        # Amazon Web Services exasol install azure      # Microsoft Azure exasol install exoscale   # Exoscale ``` -------------------------------- ### Start Database with Python XML-RPC Source: https://docs.exasol.com/db/latest/confd/jobs/db_start.htm Starts an existing database named 'DB1' using Python XML-RPC. This is a basic example without optional parameters. ```python conn.job_exec('db_start', {'params': {'db_name': 'DB1'}}) ``` -------------------------------- ### Install Exasol with Presets Source: https://docs.exasol.com/db/latest/get_started/quick_start_guide.htm Use this command to install Exasol by specifying infrastructure and installation presets. You can use built-in presets by name or local presets by path. ```bash exasol install [install-preset] exasol install aws # built-in preset by name exasol install ./my-preset # local preset by path (starts with . / ~ or contains /) exasol install ./my-infra ./my-install # both presets from local paths ``` -------------------------------- ### Enable and Start Exasol Admin UI Service Source: https://docs.exasol.com/db/latest/administration/on-premise/admin_interface/admin_ui_enable.htm Enable the Exasol Admin UI service to start automatically on boot and start it immediately. ```bash sudo systemctl enable --now "exasol-admin-ui.service" ``` -------------------------------- ### Exasol Installation Confirmation and Details Source: https://docs.exasol.com/db/latest/administration/on-premise/installation/install_as_app/deploy_on_hosts.htm This output displays the parameters that will be used for the Exasol installation and prompts for confirmation. It also provides details about the installation process, including IP addresses, version, and SSH credentials. ```text ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Exasol installation procedure is about to be started. During this procedure, Exasol software will be installed to remote hosts. It will take some time (several minutes). The installation is finished when every node reaches stage 'd' (see 'c4 ps'). After the installation is finished, you can connect to the Database or COS. During the installation, you can login to the hosts via SSH, and watch the process using: sudo journalctl -f After the installation finished, you can connect to COS using: ssh -p 20002 root@$IP IP addresses of the systems: * 203.0.113.11 * 203.0.113.12 * 203.0.113.13 * 203.0.113.14 Exasol version: 2025.1.0 Exasol package: @exasol-2025.1.0 SSH username : exasol SSH keyfile : id_rsa User password : exasol123 Data disk(s) : /dev/mapper/exasol_disk_1,/dev/mapper/exasol_disk_2 Press ENTER to proceed or Control+C to cancel the installation procedure. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ``` -------------------------------- ### Run Exasol Installation with Default Config Source: https://docs.exasol.com/db/latest/administration/on-premise/installation/install_as_app/deploy_on_hosts.htm Execute the Exasol installation on the host using the default configuration file located at './config'. ```bash ./c4 host play -i config ``` -------------------------------- ### Start Backup Source: https://docs.exasol.com/db/latest/administration/on-premise/admin_interface/administration_api_endpoints.htm Starts a backup process for a specific database. ```APIDOC ## PUT /api/v1/databases/{databaseID}/backups/start ### Description Start backup ### Method PUT ### Endpoint /api/v1/databases/{databaseID}/backups/start #### Path Parameters - **databaseID** (string) - Required - The ID of the database ``` -------------------------------- ### Start a Database using ConfD Source: https://docs.exasol.com/db/latest/administration/aws/manage_database/disable_auditing.htm Start a stopped database using the `db_start` ConfD job. Provide the name of the database to be started. ```bash confd_client db_start db_name: MY_DATABASE ``` -------------------------------- ### Example User List Output Source: https://docs.exasol.com/db/latest/administration/aws/access_management/change_user_groups.htm This example shows the output of `confd_client user_list`, detailing the groups a specific user belongs to. ```yaml confd_client user_list ... admin4: additional_groups: - exastoradm - exausers ... group: exabfsadm id: 1004 login_enabled: true ``` -------------------------------- ### Start Exasol Database (All Clusters) Source: https://docs.exasol.com/db/latest/administration/aws/manage_database/start_db.htm Starts the main and all worker clusters for the specified database. The 'cluster: +all' parameter ensures all clusters are started. ```bash confd_client db_start db_name: MY_DATABASE # or confd_client db_start db_name: MY_DATABASE cluster: +all ``` -------------------------------- ### Example: Execute ls -t command on host Source: https://docs.exasol.com/db/latest/administration/aws/c4/using_c4.htm An example of executing the 'ls -t' command on the host subsystem of a deployment. ```bash c4 connect -i c3275f84 -s host -- 'ls -t' ``` -------------------------------- ### Example exasupport Command Usage Source: https://docs.exasol.com/db/latest/administration/aws/admin_interface/exasupport.htm This example demonstrates how to retrieve SQL logs from a specific database within a given time range and write the output to a local file. It uses short options for brevity. ```bash exasupport -e MY_DATABASE -x 2 -s 2024-06-15 -o ./my_log.tar.gz ``` -------------------------------- ### Preparation for Expression Index Examples Source: https://docs.exasol.com/db/latest/performance/indexes.htm Sets up two tables and inserts sample data for demonstrating expression index creation. ```sql create or replace table t1 (id int, name varchar(20000)); create or replace table t2 (id int, name varchar(20000)); insert into t1 values (1, 'Jeff'),(2,'John'),(3,'Jacob'); insert into t2 values (1, 'Jeff'),(2,'John'),(4,'Max'); ``` -------------------------------- ### Install Perl on Debian Source: https://docs.exasol.com/db/latest/connect_exasol/drivers/odbc/odbc_linux.htm Install the full Perl system on Debian if `config_odbc` fails to start due to a missing Perl installation. ```bash apt-get install perl ``` -------------------------------- ### Enable Disk using confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/st_device_enable.htm This command-line example shows how to enable a disk using the confd_client utility. Provide the 'node' and 'devname' as arguments. ```bash confd_client st_device_enable node: 11 devname: /exa/data/storage/dev.1 ``` -------------------------------- ### SQL INSERT Function Example Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/insert.htm Demonstrates the usage of the INSERT function to replace substrings within strings. The first example replaces 2 characters starting from position 2 with 'xxx'. The second example replaces 2 characters starting from position 3 with 'CD'. ```SQL SELECT INSERT('abc',2,2,'xxx'), INSERT('abcdef',3,2,'CD'); ``` -------------------------------- ### Install Perl on CentOS 7 Source: https://docs.exasol.com/db/latest/connect_exasol/drivers/odbc/odbc_linux.htm Install the `perl-Digest-MD5` package on CentOS 7 if `config_odbc` fails to start due to a missing Perl installation. ```bash yum install perl-Digest-MD5 ``` -------------------------------- ### Create Table Example Source: https://docs.exasol.com/db/latest/sql/desc%5Bribe%5D.htm This snippet demonstrates how to create a table with specified column types, distribution, and partitioning keys. It serves as a prerequisite for describing the table. ```SQL CREATE TABLE t (i DECIMAL COMMENT IS 'id column', d DECIMAL(20,5), j DATE, k VARCHAR(5), DISTRIBUTE BY i, PARTITION BY d); ``` -------------------------------- ### EXAplus settings output example Source: https://docs.exasol.com/db/latest/connect_exasol/sql_clients/exaplus_cli/exaplus_commands/show.htm Example output showing various EXAplus settings and their current values. This helps understand the configuration parameters available. ```text AUTOCOMMIT = "ON" AUTOCOMPLETION = "ON" COLSEPARATOR = " " DEFINE = "&" ENCODING = "UTF-8" ESCAPE = "OFF"FEEDBACK = "ON"HEADING = "ON"LINESIZE = "200"NULL = "null"NUMFORMAT = "null" PAGESIZE = "UNLIMITED" SPOOL ROW SEPARATOR = "AUTO" TIME = "OFF" TIMING = "OFF" TRUNCATE HEADING = "ON" VERBOSE = "ON" ``` -------------------------------- ### Get String Length with CHARACTER_LENGTH Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/character_length.htm Use the CHARACTER_LENGTH function to determine the number of characters in a string. This example shows how to get the length of a specific string and alias the result. ```sql SELECT CHARACTER_LENGTH('aeiouäöü') C_LENGTH; ``` -------------------------------- ### SQL SIGN Function Example Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/sign.htm Demonstrates how to use the SIGN function to get the sign of a negative number. ```sql SELECT SIGN(-123); ``` -------------------------------- ### Example Upload License using confd_client Source: https://docs.exasol.com/db/latest/administration/aws/manage_license/upload_license.htm An example demonstrating how to upload a specific Exasol license file to a deployment using the `cat` and `c4 connect` commands with the `confd_client license_upload` job. ```bash cat 1234567890.exasol_license | c4 connect -s cos -i c3275f84 -- confd_client license_upload license: '""{< -}""' ``` -------------------------------- ### Create Schema, Table, Roles, and Users Source: https://docs.exasol.com/db/latest/database_concepts/privileges.htm This script sets up the database environment by creating schemas, a sample table, roles, and users. It then grants basic connection privileges to all users. ```sql --create table CREATE SCHEMA infos; CREATE TABLE infos.staff ( id DECIMAL, last_name VARCHAR(30), name VARCHAR(30), salary DECIMAL); CREATE SCHEMA data_schema; --create roles CREATE ROLE analyst; CREATE ROLE hr; CREATE ROLE data_admin; --create users CREATE USER schneider IDENTIFIED BY s56_f; CREATE USER schmidt IDENTIFIED BY x234aj; CREATE USER maier IDENTIFIED BY jd89a2; CREATE USER mueller IDENTIFIED BY lk9a4s; --for connecting to db GRANT CREATE SESSION TO schneider, schmidt, maier, mueller; ``` -------------------------------- ### Get Week Number of a Date Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/week.htm Returns the ISO-8601 week number for a specific date. Weeks start on Monday. ```sql SELECT WEEK(DATE '2012-01-05') WEEK; ``` -------------------------------- ### Example Kerberos Keytab File Creation Source: https://docs.exasol.com/db/latest/connect_exasol/bi_tools/tableau.htm An example of the `ktpass` command for creating an Exasol keytab file, demonstrating the expected format for principal and realm. ```bash ktpass -out exasol.keytab -mapuser exasoluser -princ exasol/exasoldb.example.com@EXAMPLE.COM -pass **** -ptype KRB5_NT_PRINCIPAL -target EXAMPLE.COM -crypto All  ``` -------------------------------- ### Start Nodes via confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/infra_instances_start.htm Execute this command to start specific Exasol nodes using the confd_client utility. Provide the node IDs as a list. ```bash confd_client infra_instances_start nids: '[11, 12]' ``` -------------------------------- ### Get Databases Source: https://docs.exasol.com/db/latest/administration/rest_api/rest_api.htm Retrieves a list of databases for a given account. This is an example of how to interact with the Exasol SaaS REST API using curl. ```APIDOC ## GET /api/v1/accounts/{accountId}/databases ### Description Retrieves a list of databases associated with a specific account. ### Method GET ### Endpoint /api/v1/accounts/{accountId}/databases ### Parameters #### Path Parameters - **accountId** (string) - Required - The unique identifier of the account. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET "https://cloud.exasol.com/api/v1/accounts/sd1Eks1bSY22B6eNL2T0jw/databases" -H "accept: application/json" -H "Authorization: Bearer " ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the database. - **name** (string) - The name of the database. - **clusters** (object) - Information about the database clusters. - **total** (integer) - The total number of clusters. - **running** (integer) - The number of running clusters. - **provider** (string) - The cloud provider where the database is hosted (e.g., AWS). - **region** (string) - The region where the database is located. - **usedStorage** (integer) - The amount of storage used by the database. - **createdAt** (string) - The timestamp when the database was created. - **createdBy** (string) - The identifier of the user who created the database. - **status** (string) - The current status of the database (e.g., 'tocreate'). #### Response Example ```json [ { "id": "5df0HVAcTuWY4xkoBvgzcA", "name": "Database01", "clusters": { "total": 1, "running": 0 }, "provider": "AWS", "region": "eu-central-1", "usedStorage": 0, "createdAt": "2021-05-21T10:18:54", "createdBy": "00umiyjw8OXBtXQ2O416", "status": "tocreate" } ] ``` ``` -------------------------------- ### Configure Kerberos via confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/db_configure_kerberos.htm This command-line example demonstrates how to configure Kerberos authentication for a database using the confd_client utility. Replace '<< keytab file contents >>' with the actual content of your keytab file. ```bash confd_client db_configure_kerberos db_name: mydb keytab: '<< keytab file contents >>' realm: EXAMPLE.COM service: service_name host: my_hostname ``` -------------------------------- ### Integer Division with DIV Function Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/div.htm Use the DIV function to get the integer quotient of two numbers. This example divides 15 by 6. ```sql SELECT DIV(15,6) DIV; ``` -------------------------------- ### Submit ConfD Job with Direct Syntax Source: https://docs.exasol.com/db/latest/confd/confd.htm Submits the 'db_start' job to start the 'Exasol' database using direct command syntax. ```bash confd_client db_start db_name: Exasol ``` -------------------------------- ### Find First Numeric Sequence and Second Email Address Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/regexp_instr.htm This snippet demonstrates finding the starting position of the first numeric sequence in a string and the starting position of the second email address in another string. The second example uses optional parameters for position and occurrence. ```sql SELECT REGEXP_INSTR('Phone: +497003927877678', '\+?\d+' ) REGEXP_INSTR1, REGEXP_INSTR('From: my_mail@yahoo.com - To: SERVICE@EXASOL.COM', '(?i)[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}', 1, 2 ) REGEXP_INSTR2; ``` -------------------------------- ### Submit ConfD Job with JSON Parameters Source: https://docs.exasol.com/db/latest/confd/confd.htm Submits the 'db_start' job to start the 'Exasol' database using JSON formatted parameters. ```bash confd_client -c db_start -a '{db_name: Exasol}' ``` -------------------------------- ### Execute st_node_restore via confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/st_node_restore.htm This command-line example shows how to run the st_node_restore job using the confd_client utility. Ensure confd_client is installed and configured. ```bash confd_client st_node_restore vname: DataVolume1 nid: 11 ``` -------------------------------- ### Accessing a Virtual Table Source: https://docs.exasol.com/db/latest/database_concepts/virtual_schema/how_it_works.htm This is a basic example of how to query a virtual table. The backend process involves starting a language container, negotiating capabilities, and sending pushdown requests. ```sql SELECT name FROM VIRTUAL_SCHEMA_TEST.users WHERE name like 'A%'; ``` -------------------------------- ### Deploy Exasol as an Application on Linux Hosts Source: https://docs.exasol.com/db/latest/administration/on-premise/c4/using_c4.htm This command initiates the deployment of Exasol as an application on specified Linux hosts. Refer to the Exasol installation guide for detailed steps. ```bash c4 host play ``` -------------------------------- ### Execute node_info job via confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/node_info.htm This command-line example shows how to run the node_info job using the confd_client utility to get extended information for a specified node ID. ```bash confd_client node_info nid: 13 ``` -------------------------------- ### Example Deployment Configuration with Reserve Nodes Source: https://docs.exasol.com/db/latest/administration/on-premise/nodes/reserve_nodes/add_reserve_nodes_installation.htm This configuration snippet shows how to set the CCC_PLAY_RESERVE_NODES parameter to define reserve nodes during Exasol installation. Ensure all other parameters are correctly set for your environment. ```bash CCC_HOST_ADDRS="10.0.0.11 10.0.0.12 10.0.0.13 10.0.0.14" CCC_HOST_DATADISK=/dev/mapper/exasol_disk_1,/dev/mapper/exasol_disk_2 CCC_HOST_IMAGE_USER=exasol CCC_HOST_IMAGE_PASSWORD=exasol123 CCC_HOST_KEY_PAIR_FILE=id_rsa CCC_PLAY_WORKING_COPY=@exasol-8.32.0 CCC_PLAY_DB_PASSWORD=exasol456 CCC_PLAY_RESERVE_NODES=1 ``` -------------------------------- ### Start the Database using ConfD Source: https://docs.exasol.com/db/latest/administration/on-premise/nodes/replace_node.htm Start the Exasol database using the `db_start` ConfD job. Replace `DB_NAME` with your actual database name. ```bash confd_client db_start db_name: DB_NAME ``` -------------------------------- ### Get DUMP of a string with special characters in hexadecimal format Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/dump.htm Returns the byte length, character set, and internal representation of the string 'üäö45' starting from the first character, formatted in hexadecimal notation. ```sql SELECT DUMP('üäö45',16) DUMP; ``` -------------------------------- ### Example: Retrieve SQL Logs and Save to File Source: https://docs.exasol.com/db/latest/administration/on-premise/admin_interface/exasupport.htm This example demonstrates retrieving SQL logs from a specific database within a date range and saving the output to a local file. ```bash exasupport -e MY_DATABASE -x 2 -s 2024-06-15 -o ./my_log.tar.gz ``` -------------------------------- ### Get NVIDIA Container CLI Info Source: https://docs.exasol.com/db/latest/administration/on-premise/gpu_support/gpu_nvidia_validation.htm The `nvidia-container-cli info` command verifies that the container tooling is correctly installed and recognizes the available GPUs. It displays NVRM and CUDA versions, and details about each detected GPU. ```bash $ nvidia-container-cli info NVRM version: 535.247.01 CUDA version: 12.2 Device Index: 0 Device Minor: 0 Model: Tesla T4 Brand: Nvidia GPU UUID: GPU-43aae450-f01d-5854-12d2-7ae261f27920 Bus Location: 00000000:00:1e.0 Architecture: 7.5 ``` -------------------------------- ### Run Exasol AI Lab Container Source: https://docs.exasol.com/db/latest/ai/ai_application/extract-insights-from-text.htm Starts the Exasol AI Lab container, which includes the Text AI Extension and example notebooks. Access it via http://localhost:49494 with default credentials 'ailab'. ```bash docker run --publish 0.0.0.0:49494:49494 exasol/ai-lab ``` -------------------------------- ### Execute plugin_info via confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/plugin_info.htm Use this command-line example to execute the 'plugin_info' job with the confd_client tool. Specify the plugin name as a parameter. ```bash confd_client plugin_info plugin_name: Plugin1 ``` -------------------------------- ### Update Exasol from Jump Host without Internet Access Source: https://docs.exasol.com/db/latest/administration/on-premise/upgrade/updates.htm Example for updating Exasol from a jump host without internet access. The '--from-file' option points to the pre-downloaded Exasol installation package. ```bash c4 update cluster -i ./config -p c3275f84 -t @exasol-2025.1.0 --from-file ./exasol-2025.1.0.tar.gz ``` -------------------------------- ### LEAD Analytic Function Example Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/lead.htm Demonstrates how to use the LEAD function to get the ID from the next row within each department, ordered by hire date. The offset is 1, and a default value of NULL is used if no subsequent row exists. ```SQL SELECT id, department, hire_date, LEAD(id, 1) OVER (PARTITION BY department ORDER BY hire_date) LEAD FROM employee_table ORDER BY department, hire_date; ``` -------------------------------- ### Connect to Exasol and Prepare Database Source: https://docs.exasol.com/db/latest/advanced_analytics/package_r/train_locally_predict_in_exasol.htm Establishes a connection to the Exasol database, creates a schema if it doesn't exist, opens the schema, and creates an empty table for data storage. ```R exaconn <- dbConnect( drv = "exa", exahost = "192.168.56.103:8563", uid = "sys", pwd = "exasol") odbcQuery(exaconn, "CREATE SCHEMA IF NOT EXISTS r_demo") odbcQuery(exaconn, "OPEN SCHEMA r_demo") odbcQuery(exaconn, "CREATE OR REPLACE TABLE boston_housing( crim DOUBLE, zn DOUBLE, indus DOUBLE, chas VARCHAR(10), nox DOUBLE, rm DOUBLE, age DOUBLE, dis DOUBLE, rad DOUBLE, tax DOUBLE, ptratio DOUBLE, b DOUBLE, lstat DOUBLE, medv DOUBLE, split VARCHAR(10), id INT )") ``` -------------------------------- ### C# Exasol ADO.NET Connection and Query Example Source: https://docs.exasol.com/db/latest/connect_exasol/drivers/ado_net.htm This snippet shows how to use the Exasol ADO.NET Data Provider to connect to an Exasol instance, execute a 'SELECT * FROM CAT' query, and print the results. Ensure the Exasol.EXADataProvider is installed and connection string details are correct. ```csharp using System; using System.Collections.Generic; using System.Text; using System.Data.Common; namespace ConnectionTest { class Program { static void Main(string[] args) { DbProviderFactory factory=null; try { factory = DbProviderFactories.GetFactory("Exasol.EXADataProvider"); Console.WriteLine("Found Exasol driver"); DbConnection connection = factory.CreateConnection(); connection.ConnectionString = "Server=192.168.6.11..14;Port=8563;UID=sys;PWD=exasol;Schema=sys"; connection.Open(); Console.WriteLine("Connected to server"); DbCommand cmd = connection.CreateCommand(); cmd.Connection = connection; cmd.CommandText = "SELECT * FROM CAT"; DbDataReader reader = cmd.ExecuteReader(); Console.WriteLine("Schema SYS contains:"); while (reader.Read()) { Console.WriteLine("{0}, {1}", reader["TABLE_NAME"], reader["TABLE_TYPE"]); } reader.Close(); connection.Close(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } } } ``` -------------------------------- ### Example Backup Disk Space Calculation Source: https://docs.exasol.com/db/latest/administration/aws/backup_restore/backup_disk_space.htm Demonstrates a practical calculation for local backups with specific input parameters, including total data volume, number of backups, and incremental size. ```text Parameter | Value | Explanation ---|---|--- Total data volume (net) | 1200 GiB | Compressed data + index volume + statistical and auditing data Full backup data size | 2400 GiB | Total data volume (net) × 2 Incremental backup data size | 3600 GiB | Total data volume (net) × 3 Required backup disk space without redundancy | 6000 GiB | Full backup data size + Incremental backup data size Required backup disk space with redundancy | **12000 GiB** | Required backup disk space without redundancy × 2 ``` -------------------------------- ### Load Sample Data using SQL Source: https://docs.exasol.com/db/latest/get_started/exasol_personal_administration.htm Execute this command in the deployment directory to load sample data into your Exasol database. Alternatively, use a SQL client and paste the provided SQL statements. ```bash exasol connect < sample.sql ``` -------------------------------- ### Detecting Cycles in Hierarchical Queries with CONNECT_BY_ISCYCLE Source: https://docs.exasol.com/db/latest/sql_references/functions/alphabeticallistfunctions/connect_by_iscycle.htm This SQL snippet demonstrates how to use the CONNECT_BY_ISCYCLE function in an Exasol database. It's used in conjunction with a CONNECT BY clause to identify rows that form a cycle, returning 1 if a cycle is detected and 0 otherwise. The example queries the 'employees' table to find cycles starting from 'Clark'. ```sql SELECT CONNECT_BY_ISCYCLE, SYS_CONNECT_BY_PATH(last_name, '/') "PATH" FROM employees WHERE last_name = 'Clark' CONNECT BY NOCYCLE PRIOR employee_id = manager_id START WITH last_name = 'Clark'; ``` -------------------------------- ### Install Exasol Agent Skills Source: https://docs.exasol.com/db/latest/ai/ai_build_agents/index.htm This script installs the necessary agent skills for Exasol development. Ensure you have curl installed. ```bash curl -fsSL https://raw.githubusercontent.com/exasol-labs/exasol-agent-skills/main/install.sh | sh ``` -------------------------------- ### Upload License via confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/license_upload.htm This command-line example shows how to upload a license file using the confd_client utility. It reads the license content from a file named 'license.exasol_license'. ```bash confd_client license_upload license: '"{< ./license.exasol_license}"}' ``` -------------------------------- ### Start All Nodes in a Deployment Source: https://docs.exasol.com/db/latest/administration/aws/c4/using_c4.htm Start all nodes of a deployment using the 'c4 up PLAY_ID' command. This is equivalent to starting EC2 instances. ```bash c4 up PLAY_ID ``` -------------------------------- ### Example Exasol JDBC Driver Configuration Source: https://docs.exasol.com/db/latest/administration/aws/manage_drivers/add_jdbc_driver.htm A complete example of a settings.cfg file for the Exasol JDBC driver, including driver name, prefix, and fetch/insert sizes. ```bash DRIVERNAME=EXASOL_JDBC PREFIX=jdbc:exa: FETCHSIZE=100000 INSERTSIZE=-1 ``` -------------------------------- ### Install Exasol Text AI Extension Source: https://docs.exasol.com/db/latest/ai/ai_application/extract-insights-from-text.htm Installs the Exasol Text AI Extension using pip. This is a prerequisite for standalone installation. ```bash pip install exasol_text_ai_extension ``` -------------------------------- ### Execute db_snapshot_backup_list via confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/db_snapshot_backup_list.htm This command-line example shows how to run the db_snapshot_backup_list job using the confd_client utility. Specify the database name as a parameter. ```bash confd_client db_snapshot_backup_list db_name: exa_db ``` -------------------------------- ### Start a Database using ConfD Source: https://docs.exasol.com/db/latest/administration/on-premise/sddc/sddc_administration.htm Initiate the startup of a database using the `db_start` ConfD job. Ensure only one database is configured to run at a time to prevent data corruption. ```bash confd_client db_start db_name: PROD ``` -------------------------------- ### Start Exasol Cluster Source: https://docs.exasol.com/db/latest/administration/aws/manage_clusters/start_cluster.htm Start all nodes in an Exasol cluster using the 'confd_client infra_db_start' command. Specify the name of the cluster to be started. ```bash confd_client infra_db_start db_name: WORKER1 ``` -------------------------------- ### Configure ODBC Driver and Data Sources Source: https://docs.exasol.com/db/latest/connect_exasol/drivers/odbc/odbc_linux.htm Navigate to the Exasol ODBC driver installation directory and run the `config_odbc` script to generate the `odbc.ini` file and set up the ODBC driver. ```bash cd Exasol_ODBC-* ./config_odbc ``` -------------------------------- ### Start Database Source: https://docs.exasol.com/db/latest/administration/on-premise/admin_interface/administration_api_endpoints.htm Starts a specific database. ```APIDOC ## PUT /api/v1/databases/{databaseID}/start ### Description Start database ### Method PUT ### Endpoint /api/v1/databases/{databaseID}/start #### Path Parameters - **databaseID** (string) - Required - The ID of the database ``` -------------------------------- ### Add BucketFS Service via confd_client Source: https://docs.exasol.com/db/latest/confd/jobs/bucketfs_add.htm This command-line example shows how to add a BucketFS service using the confd_client utility. Parameters are provided as key-value pairs. ```bash confd_client bucketfs_add bucketfs_name: bucketfs1 http_port: 0 https_port: 2581 owner: '[500, 500]' ``` -------------------------------- ### Install Kernel Headers and Development Packages Source: https://docs.exasol.com/db/latest/administration/on-premise/gpu_support/gpu_install_driver_rhel.htm Install the necessary kernel-devel and kernel-headers packages for your current kernel version. This is required for driver installation. ```bash sudo dnf -y install kernel-devel-$(uname -r) kernel-headers-$(uname -r) ```