Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ODBC driver and DSN name #20

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/user/general/comments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Comments
Overview
========

ODFE SQL supports ANSI SQL and MySQL style comments, including single-line comments or block comments across multiple lines. Both can be used on separate line(s) or within a SQL statement if needed.
OpenSearch SQL supports ANSI SQL and MySQL style comments, including single-line comments or block comments across multiple lines. Both can be used on separate line(s) or within a SQL statement if needed.


Single-line Comments
Expand Down
174 changes: 87 additions & 87 deletions docs/user/general/datatypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,97 +13,97 @@ Data Types
Overview
========

ODFE SQL Data Types
-------------------

The ODFE SQL Engine support the following data types.

+---------------+
| ODFE SQL Type |
+===============+
| boolean |
+---------------+
| byte |
+---------------+
| short |
+---------------+
| integer |
+---------------+
| long |
+---------------+
| float |
+---------------+
| double |
+---------------+
| string |
+---------------+
| text |
+---------------+
| timestamp |
+---------------+
| datetime |
+---------------+
| date |
+---------------+
| time |
+---------------+
| interval |
+---------------+
| ip |
+---------------+
| geo_point |
+---------------+
| binary |
+---------------+
| struct |
+---------------+
| array |
+---------------+
OpenSearch SQL Data Types
-------------------------

The OpenSearch SQL Engine support the following data types.

+---------------------+
| OpenSearch SQL Type |
+=====================+
| boolean |
+---------------------+
| byte |
+---------------------+
| short |
+---------------------+
| integer |
+---------------------+
| long |
+---------------------+
| float |
+---------------------+
| double |
+---------------------+
| string |
+---------------------+
| text |
+---------------------+
| timestamp |
+---------------------+
| datetime |
+---------------------+
| date |
+---------------------+
| time |
+---------------------+
| interval |
+---------------------+
| ip |
+---------------------+
| geo_point |
+---------------------+
| binary |
+---------------------+
| struct |
+---------------------+
| array |
+---------------------+

Data Types Mapping
------------------

The table below list the mapping between OpenSearch Data Type, ODFE SQL Data Type and SQL Type.

+-----------------+---------------+-----------+
| OpenSearch Type | ODFE SQL Type | SQL Type |
+=================+===============+===========+
| boolean | boolean | BOOLEAN |
+-----------------+---------------+-----------+
| byte | byte | TINYINT |
+-----------------+---------------+-----------+
| short | byte | SMALLINT |
+-----------------+---------------+-----------+
| integer | integer | INTEGER |
+-----------------+---------------+-----------+
| long | long | BIGINT |
+-----------------+---------------+-----------+
| float | float | REAL |
+-----------------+---------------+-----------+
| half_float | float | FLOAT |
+-----------------+---------------+-----------+
| scaled_float | float | DOUBLE |
+-----------------+---------------+-----------+
| double | double | DOUBLE |
+-----------------+---------------+-----------+
| keyword | string | VARCHAR |
+-----------------+---------------+-----------+
| text | text | VARCHAR |
+-----------------+---------------+-----------+
| date | timestamp | TIMESTAMP |
+-----------------+---------------+-----------+
| ip | ip | VARCHAR |
+-----------------+---------------+-----------+
| date | timestamp | TIMESTAMP |
+-----------------+---------------+-----------+
| binary | binary | VARBINARY |
+-----------------+---------------+-----------+
| object | struct | STRUCT |
+-----------------+---------------+-----------+
| nested | array | STRUCT |
+-----------------+---------------+-----------+

Notes: Not all the ODFE SQL Type has correspond OpenSearch Type. e.g. data and time. To use function which required such data type, user should explicitly convert the data type.
The table below list the mapping between OpenSearch Data Type, OpenSearch SQL Data Type and SQL Type.

+-----------------+---------------------+-----------+
| OpenSearch Type | OpenSearch SQL Type | SQL Type |
+=================+=====================+===========+
| boolean | boolean | BOOLEAN |
+-----------------+---------------------+-----------+
| byte | byte | TINYINT |
+-----------------+---------------------+-----------+
| short | byte | SMALLINT |
+-----------------+---------------------+-----------+
| integer | integer | INTEGER |
+-----------------+---------------------+-----------+
| long | long | BIGINT |
+-----------------+---------------------+-----------+
| float | float | REAL |
+-----------------+---------------------+-----------+
| half_float | float | FLOAT |
+-----------------+---------------------+-----------+
| scaled_float | float | DOUBLE |
+-----------------+---------------------+-----------+
| double | double | DOUBLE |
+-----------------+---------------------+-----------+
| keyword | string | VARCHAR |
+-----------------+---------------------+-----------+
| text | text | VARCHAR |
+-----------------+---------------------+-----------+
| date | timestamp | TIMESTAMP |
+-----------------+---------------------+-----------+
| ip | ip | VARCHAR |
+-----------------+---------------------+-----------+
| date | timestamp | TIMESTAMP |
+-----------------+---------------------+-----------+
| binary | binary | VARBINARY |
+-----------------+---------------------+-----------+
| object | struct | STRUCT |
+-----------------+---------------------+-----------+
| nested | array | STRUCT |
+-----------------+---------------------+-----------+

Notes: Not all the OpenSearch SQL Type has correspond OpenSearch Type. e.g. data and time. To use function which required such data type, user should explicitly convert the data type.


Undefined Data Type
Expand Down
2 changes: 1 addition & 1 deletion docs/user/general/values.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Data Types

NULL and MISSING Values
=======================
ODFE SQL has two ways to represent missing information. (1) The presence of the field with a NULL for its value. and (2) the absence of the filed.
OpenSearch SQL has two ways to represent missing information. (1) The presence of the field with a NULL for its value. and (2) the absence of the filed.

Please note, when response is in table format, the MISSING value is translate to NULL value.

Expand Down
2 changes: 1 addition & 1 deletion sql-odbc/docs/dev/BUILD_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ODFE SQL ODBC Driver Build Instructions
# OpenSearch SQL ODBC Driver Build Instructions

## Windows

Expand Down
2 changes: 1 addition & 1 deletion sql-odbc/docs/dev/run_tests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ODFE SQL ODBC Driver Testing
# OpenSearch SQL ODBC Driver Testing

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion sql-odbc/docs/test/data_connection_wizard.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

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

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

Expand Down
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 @@ -3,7 +3,7 @@
## Prerequisites
* [Download and install](../../README.md) OpenSearch SQL ODBC Driver.
* [Install and configure](https://opendistro.github.io/for-elasticsearch-docs/docs/install/) OpenSearch.
* Open ODBC Data Source Administrator. Click on **System DSN** > **ODFE SQL ODBC DSN** > **Configure**.
* Open ODBC Data Source Administrator. Click on **System DSN** > **OpenSearch SQL ODBC DSN** > **Configure**.
* Set all connection options & Click on **Test**. Connection test should return `Connection Successful`.

## Microsoft Excel Connectivity
Expand Down
2 changes: 1 addition & 1 deletion sql-odbc/docs/test/microsoft_query_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

* Select **Databases** > **ODFE SQL ODBC DSN**.
* Select **Databases** > **OpenSearch SQL ODBC DSN**.
* Clear the **Use the Query Wizard to create/edit queries** check box, and then click on **OK**.

<img src="img/microsoft_query_disable_use_the_query_wizard_option.png" width="500">
Expand Down
2 changes: 1 addition & 1 deletion sql-odbc/docs/test/odbc_data_source_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

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

<img src="img/from_odbc_dsn.png" width="600">

Expand Down
2 changes: 1 addition & 1 deletion sql-odbc/docs/test/query_wizard_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

* Select **Databases** > **ODFE SQL ODBC DSN**.
* Select **Databases** > **OpenSearch SQL ODBC DSN**.
* Ensure the **Use the Query Wizard to create/edit queries** check box is selected, and then click **OK**.

<img src="img/query_wizard_enable_use_the_query_wizard_option.png" width="400">
Expand Down
6 changes: 3 additions & 3 deletions sql-odbc/docs/user/mac_configure_dsn.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

## Adding a Driver Entry

Note: In order to use the OpenSearch SQL ODBC driver with the [Tableau Connector](), the **Description of the Driver** field *must* start with `ODFE SQL ODBC`.
Note: In order to use the OpenSearch SQL ODBC driver with the [Tableau Connector](), the **Description of the Driver** field *must* start with `OpenSearch SQL ODBC`.

1. Go to the **ODBC Drivers** tab.
2. Click **Add a Driver**.
* **Description of the Driver**: The driver name used for ODBC connections (ex. `ODFE SQL ODBC Driver`)
* **Description of the Driver**: The driver name used for ODBC connections (ex. `OpenSearch SQL ODBC Driver`)
* **Driver File Name**: The path to the driver file (default installed path: `/Library/ODBC/opensearch-sql-odbc/bin/libodfesqlodbc.dylib`)
* **Setup File Name**: The path to the driver file (default installed path: `/Library/ODBC/opensearch-sql-odbc/bin/libodfesqlodbc.dylib`)
* Set as a **User** driver
Expand All @@ -29,7 +29,7 @@ This is not required if you are using the Tableau Connector, but will help with
1. Go to the **User DSN** tab
2. Select **Add** on the right side of the window.
* Choose the Driver you added above.
* **Data Source Name (DSN)**: The name of the DSN used to store connection options (ex. `ODFE SQL ODBC DSN`)
* **Data Source Name (DSN)**: The name of the DSN used to store connection options (ex. `OpenSearch SQL ODBC DSN`)
* **Comment**: Not required
* Add key-value pairs by using the **'+'** button. Below is a picture of the recommended set of options for a default local OpenSearch installation.
3. Click **OK** to save the DSN configuration.
Expand Down
4 changes: 2 additions & 2 deletions sql-odbc/docs/user/microsoft_excel_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

* Open **ODBC Data Source Administrator**.
* Click on **System DSN**.
* Select **ODFE SQL ODBC DSN**.
* Select **OpenSearch SQL ODBC DSN**.
* Click on **Configure**.

<img src="img/test_dsn_configure.png" width=500>
Expand All @@ -30,7 +30,7 @@

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions sql-odbc/docs/user/microsoft_excel_support_mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
`sudo /Applications/iODBC/iODBC\ Administrator64.app/Contents/MacOS/iODBC\ Administrator64`

* Click on **System DSN**.
* Select **ODFE SQL ODBC DSN**.
* Select **OpenSearch SQL ODBC DSN**.
* Click on **Configure**.

<img src="img/excel_iodbc_dsn.png" width="650">
Expand All @@ -37,7 +37,7 @@

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions sql-odbc/docs/user/windows_configure_dsn.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<img src="img/win_odbc_data_sources.png" width="30%">

2. Click on the `System DSN` tab. Select `ODFE SQL ODBC DSN` and click on `Configure`.
2. Click on the `System DSN` tab. Select `OpenSearch SQL ODBC DSN` and click on `Configure`.

<img src="img/win_system_dsn.png" width="60%">

Expand Down Expand Up @@ -39,7 +39,7 @@ For example, if you can connect to server using following curl command

<img src="img/win_user_dsn.png" width="60%">

2. Select `ODFE SQL ODBC Driver` and click on `Finish`.
2. Select `OpenSearch SQL ODBC Driver` and click on `Finish`.

<img src="img/win_user_dsn_select_driver.png" width="50%">

Expand Down
4 changes: 2 additions & 2 deletions sql-odbc/src/DSNInstaller/dsn_installer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
// maintain null characters.
using namespace std::string_literals;

std::wstring driver_name = L"ODFE SQL ODBC Driver";
std::wstring driver_name = L"OpenSearch SQL ODBC Driver";
std::wstring driver_filename = L"libodfesqlodbc.dylib";
std::wstring dsn_name = L"ODFE SQL ODBC DSN";
std::wstring dsn_name = L"OpenSearch SQL ODBC DSN";
std::wstring dsn_ini_filename = L"odfesqlodbc.ini";

std::wstring driver_name_placeholder = L"%DRIVER_NAME%";
Expand Down
4 changes: 2 additions & 2 deletions sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ OdfeSqlOdbcPBIConnectorImpl = (Server as text) as table =>
],

ConnectionString = [
Driver = "ODFE SQL ODBC Driver",
Driver = "OpenSearch SQL ODBC Driver",
Host = Server
],

Expand Down Expand Up @@ -188,7 +188,7 @@ OdfeSqlOdbcPBIConnector = [
db = OdfeSqlOdbcPBIConnector.Contents(dsr[address][server])
in
db,
GetFriendlyName = (dsr) => "ODFE SQL ODBC"
GetFriendlyName = (dsr) => "OpenSearch SQL ODBC"
]
],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</connection-resolver>
<driver-resolver>
<driver-match >
<driver-name type='regex'>ODFE SQL ODBC*</driver-name>
<driver-name type='regex'>OpenSearch SQL ODBC*</driver-name>
</driver-match>
</driver-resolver>
</tdr>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</connection-resolver>
<driver-resolver>
<driver-match >
<driver-name type='regex'>ODFE SQL ODBC*</driver-name>
<driver-name type='regex'>OpenSearch SQL ODBC*</driver-name>
</driver-match>
</driver-resolver>
</tdr>
Loading