Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
31 changes: 31 additions & 0 deletions sql-odbc/docs/test/data_connection_wizard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Data Connection Wizard

* Open blank workbook in Microsoft Excel.
* Click on **Data** > **Get Data** > **Legacy Wizards** > **From Data Connection Wizard (Legacy)**

<img src="img/data_connection_wizard_select.png" width="400">

* Select **ODBC DSN** and Click on **Next**.

<img src="img/data_connection_wizard_dsn.png" width="500">

* Select **ODFE SQL ODBC DSN** and Click on **Next**.

<img src="img/data_connection_wizard_select_dsn.png" width="500">

* Select required table and Click on **Next**.

<img src="img/data_connection_wizard_table_list.png" width="500">

* Add the description. Edit file names if required. Select whether to use this connection file while refreshing data. Click on **Finish**.

<img src="img/data_connection_wizard_save_connection_file.png" width="500">

* Select the worksheet to load data. Click on **OK**.

<img src="img/data_connection_wizard_select_worksheet.png" width="300">

* Data will be loaded in the spreadsheet.

<img src="img/data_connection_wizard_load_data.png">

2 changes: 1 addition & 1 deletion sql-odbc/docs/test/excel_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ There are multiple ways to load data from Elasticsearch in Microsoft Excel.
* [ODBC as Data Source](odbc_data_source_connection.md)
* [Microsoft Query](microsoft_query_connection.md)
* [Query Wizard](query_wizard_connection.md)

* [Data Connection Wizard (Legacy)](data_connection_wizard.md)

## Use Microsoft Excel with data loaded from Open distro for Elasticsearch

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed sql-odbc/docs/test/img/query_wizard_error_popup.png
Binary file not shown.
Binary file not shown.
10 changes: 3 additions & 7 deletions sql-odbc/docs/test/microsoft_query_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@

<img src="img/microsoft_query_disable_use_the_query_wizard_option.png" width="500">

* Click on **Options** in Add Table window.

<img src="img/microsoft_query_add_tables.png" width="300">

* Click **Refresh**. Select checkbox **Tables**. Clear all other checkboxes. Click on **OK**.

<img src="img/microsoft_query_table_options.png" width="300">

* Select tables and click on **Add**. After all required tables are added, click on **Close**.
* Select table and click on **Add**.

<img src="img/microsoft_query_select_tables.png" width="300">

* Click on **Close**.

* Double click on required columns. You can double-click the asterisk (*) to select all the columns from a table.

Expand Down
12 changes: 0 additions & 12 deletions sql-odbc/docs/test/query_wizard_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@

<img src="img/query_wizard_enable_use_the_query_wizard_option.png" width="400">

* You might get an popup with a message `This data source contains no visible tables`. Click on **OK**.

<img src="img/query_wizard_error_popup.png" width="350">

* Click on **Options** in Query Wizard window.

<img src="img/query_wizard_choose_coulms.png" width="450">

* Select checkbox **Tables**. Clear all other checkboxes. Click on **OK**.

<img src="img/query_wizard_table_options.png" width="300">

* You will see list of available tables & columns. Select required tables/columns and click on **>**.
* After selecting all required columns, Click on **Next**.

Expand Down
Binary file added sql-odbc/docs/user/img/excel_advanced_option.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sql-odbc/docs/user/img/excel_auth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sql-odbc/docs/user/img/excel_data_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sql-odbc/docs/user/img/excel_export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sql-odbc/docs/user/img/excel_load_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sql-odbc/docs/user/img/excel_refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sql-odbc/docs/user/img/excel_select_dsn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sql-odbc/docs/user/img/excel_select_odbc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions sql-odbc/docs/user/microsoft_excel_support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Microsoft Excel

## Prerequisites

* Microsoft Excel 2016 and higher
* [Open Distro for Elasticsearch](https://opendistro.github.io/for-elasticsearch-docs/docs/install/)
* [Open Distro for Elasticsearch SQL ODBC driver](https://opendistro.github.io/for-elasticsearch-docs/docs/sql/odbc/)
* A preconfigured [User or System DSN](../../README.md)

## Load data

* Open blank workbook in Microsoft Excel.
* Click on **Data** > **Get Data** > **From Other Sources** > **From ODBC**

<img src="img/excel_select_odbc.png" width="400">

* Select **ODFE SQL ODBC DSN**. Click **OK**.

<img src="img/excel_select_dsn.png" width="400">

* Select **Default or Custom** in connection credentials windows and click on **Connect**.

<img src="img/excel_auth.png" width="500">

* Select a table from list to load data preview. Click on **Load**.

<img src="img/excel_data_preview.png">

* Data will be loaded in the spreadsheet.

<img src="img/excel_load_data.png">

**NOTE**: There are multiple ways to load data in Microsoft Excel. Alternate options are **Data** > **Get Data** > **From Other Sources** > **From Microsoft Query** and **Data** > **Get Data** > **Legacy Wizards** > **From Data Connection Wizard**.

## Refresh Data

To refresh the data click on **Query** > **Refresh**.

<img src="img/excel_refresh.png" width=500>

Alternately, **Data** > **Refresh** option can also be used to refresh the data.

## Export as CSV files

* Click on **File** > **Save As**.
* Select Location to Save file.
* Type the file name.
* Set type as **CSV UTF-8(Comma delimited)(*.csv)**.

<img src="img/excel_export.png" width=750>

* Click **Save**.
* Data will be exported to selected location in CSV format.

## Troubleshooting

* If the table has large number of datarows, increase [the keepalive](https://github.com/opendistro-for-elasticsearch/sql/blob/master/docs/dev/Pagination.md#opendistrosqlcursorkeep_alive) value accordlingly.

* If the table has nested or object type column, you might get an error as below.

<img src="img/excel_data_preview_error.png" width=500>

If you ignore the error and try to load the data, column name and values might not match.

In this case, please use advanced options while connecting to the data source.

<img src="img/excel_advanced_option.png" width=500>

Also, make sure query doesn't include the name of nested or object type column name. For example, `SELECT products FROM kibana_sample_data_ecommerce` where product is nested type column might have data loss.

This issue will be resolved when [Object field is missing in SELECT result](https://github.com/opendistro-for-elasticsearch/sql/issues/564) is fixed.