diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 6c468153e..884eb5697 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -1,4 +1,4 @@ -name: Build and Release timestream-odbc +name: Build and Release database-odbc # This workflow is triggered on creating tags to master on: push: diff --git a/.gitignore b/.gitignore index 7ac83629f..e219f313e 100644 --- a/.gitignore +++ b/.gitignore @@ -57,9 +57,9 @@ CTestTestfile.cmake /sdk-build64/ /cmake-build32/ /cmake-build64/ -/src/PowerBIConnector/TimestreamConnector/bin/Debug/ -/src/PowerBIConnector/TimestreamConnector/obj/ -/src/PowerBIConnector/TimestreamConnector/.vs/ +/src/PowerBIConnector/DatabaseConnector/bin/Debug/ +/src/PowerBIConnector/DatabaseConnector/obj/ +/src/PowerBIConnector/DatabaseConnector/.vs/ src/aws-sdk-cpp/ default.profraw test_output.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cda89d7f..649d33004 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,136 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v1.0.3](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v1.0.2) - 2021-09-17 +## [v1.0.1](fake_link) - date ### Added -- Power BI Connector with AWS Profile and IAM authentication. +- Feature X ### Fixed -- Database and table names of 256 characters prevents data from loading in Excel and Power BI -- NULL catalog in SQLCatalog returns all columns. -- Describe and Show queries not working with SQLPrepare. - -## [v1.0.2](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v1.0.2) - 2021-09-17 -### Fixed -- Okta authentication not working in 32-bit Amazon Linux 2. - -## [v1.0.1](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v1.0.1) - 2021-09-14 -### Fixed -- Obfuscated the session token for IAM authentication in the ODBC user interface for Windows and make sure it is not in the logs. - -## [v1.0.0](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v1.0.0) - 2021-09-01 -### Added -- 32 bit support for Amazon Linux 2. - -## [v0.5.2](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.5.2) - 2021-08-29 -### Added -- Sample odbc.ini and odbcinst.ini files. -- Convert region to lower case when connecting. - -### Fixed -- Don't treat trailing 0s as truncation during data conversion. -- Seg fault in TestSQLGetCursorName when no AWS credentials are supplied. -- Use exact number for longs in data-conversion. -- Driver version is now displayed in iODBC Administrator. - -## [v0.5.1](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.5.1) - 2021-08-17 -### Added -- Big Sur support. -- Timestamps in logs. - -### Fixed -- Invalid fieldnames when UserID/Password is empty in ODBC Administrator for Windows. -- Infinite loop in result cursor logic. -- Define DBMS_NAME for Linux and macOS. -- Simplified .deb and .rpm filenames. -- NPE in TestSQLGetCursorName. -- Updated default path for Windows logging. -- Updated AWS SDK version to 1.9.79. - -## [v0.5.0](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.5.0) - 2021-08-04 -### Added -- More connection tests. - -### Fixed -- Removed the version and bitness from the default path in the Windows ODBC installers. -- Set the default log level to "OFF" instead of "WARNING". -- Updated the DSN setup documentation for Windows. -- AWS AppSec Finding: Added nullptr checks before dereferencing. -- Tab order in ODBC UI for Windows. -- Hid fields in the ODBC UI for Windows instead of disabling them. -- Automated SQLCancel tests. - -## [v0.4.3](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.4.3) - 2021-07-29 -### Added -- Merged tests into one executable -- Integration tests for data conversion -- Code coverage -- Performance test framework - -### Fixed -- Removed the checks for ordinal position in SQLColumns tests -- AWS AppSec Finding: Memory out of bound error in makeConnectString - -## [v0.4.2](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.4.2) - 2021-07-20 -### Fixed -- Renamed odfesqlodbc directory to odbcdriver and updated references -- Renamed odfeenlist directory to odbcdriverenlist and update references -- AWS AppSec Finding: Unsafe C functions that do not check memory bounds - -## [v0.4.1](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.4.1) - 2021-07-08 -### Fixed -- Intermittent crash in Excel in multi-connection environments on disconnect. Aws::InitApi and Aws::ShutdownApi is now only called once per application instead of once per connection. - -## [v0.4.0](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.4.0) - 2021-07-07 -### Added -- Linux 32-bit and Linux 64-bit support for the ODBC Driver -- Linux support for the ODBC sample client application - -### Fixed -- Excessive memory usage -- Improved test cases -- Removed "ES_" and "TS_" from function and variable names -- All warnings in driver and enabled -Werror for Mac and Linux build -- Plus sign (+) not working in connection string -- Removed "es_" and "ts_" from filename prefixes -- Failing tests when using Okta or Azure AD authentication - -## [v0.3.2](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.3.2) - 2021-06-30 -### Fixed -- Password appearing in plain text -- Plus sign not working in connection string values -- Possible malformed AzureAD/Okta request body - -## [v0.3.0](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.3.0) - 2021-06-15 -### Added -- The ability to connect using Azure Active Directory and Okta. -- Support for SQL Metadata (SQLColumns, SQLTables, SQLGetInfo, SQLGetTypeInfo) -- Query Cancellation -- Support for Excel and PowerBI -### Changed -- Removed "ES_" and "TS_" from filenames -- Changed the user interface in Windows to mask the passwords and secret keys -- Paginated the results -- Changed SQLPrepare to get metadata rather than running the query - -## [v0.2.0](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.2.0) - 2021-03-26 -### Added -- The ability to query data from Amazon Timestream. -- Full support for Amazon Timestream supported datatype: int, bigint, boolean, double, varchar, array[T,...], row(T,...), date, time, timestamp, interval, timeseries[row(timestamp,T,...)], unknown -- Support for SQL query execution (SQLPrepare, SQLExecute, SQLExecDirect) -- Support for SQL data type conversion (SQLGetData, SQLBindCol) -- Support for SQL results (SQLFetch, SQLMoreResults, SQLNumResultCols) -- Support for SQL column descriptors (SQLDescribe, SQLGetDescRec, SQLSetDescRec, SQLGetDescField, SQLSetDescField) -- Support `ProfileName` in `AWS_PROFILE` authentication mode -### Changed -- `AWS PROFILE` authentication mode to `AWS_PROFILE` -- Default log level from WARNING to OFF -- Removed the default log location for Windows - -## [v0.1.0](https://github.com/Bit-Quill/timestream-odbc/releases/tag/v0.1.0) - 2021-02-12 -### Added -- The ability to connect to Amazon Timestream using IAM and AWS Profile. -- The ability to retrieve row number from a Select query, but no support for any SQL data types yet. -### Fixed -- Memory leak in logging and query. - +- Bug Y diff --git a/README.md b/README.md index 5b7c76a20..5c7aec712 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Amazon Timestream ODBC Driver +# Database ODBC Driver -TimestreamODBC is a read-only ODBC driver for Windows, Mac and Linux for connecting to Amazon Timestream. +DatabaseODBC is a read-only ODBC driver for Windows, Mac and Linux for connecting to Database. -[![codecov](https://codecov.io/gh/Bit-Quill/timestream-odbc/branch/develop/graph/badge.svg?token=MNHPEGAK9D)](https://codecov.io/gh/Bit-Quill/timestream-odbc) +Code coverage badge placeholder. ## Specifications @@ -23,19 +23,19 @@ You can use the installers generated from the most recent release ### Installing on Windows 10 or Windows Server 2019 -1. Run `AmazonTimestreamODBC32-[version].msi` or `AmazonTimestreamODBC64-[version].msi` to install the Amazon Timestream ODBC Driver. +1. Run `DatabaseODBC32-[version].msi` or `DatabaseODBC64-[version].msi` to install the Database ODBC Driver. 2. [Configure the DSN entries](./docs/user/windows_configure_dsn.md) using ODBC Data Source Administrator. ### Installing on macOS Catalina or macOS Big Sur -[iODBC Driver Manager](http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/Downloads) should be installed before installing the Amazon Timestream ODBC Driver on macOS. +[iODBC Driver Manager](http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/Downloads) should be installed before installing the Database ODBC Driver on macOS. -1. Run `AmazonTimestreamODBC-[version].pkg` to install the Amazon Timestream ODBC Driver. +1. Run `DatabaseODBC-[version].pkg` to install the Database ODBC Driver. 2. [Configure the Driver and DSN entries](./docs/user/mac_configure_dsn.md). ### Installing the 32-bit deb file on Ubuntu 20.04 64-bit -The 32-bit dependencies need to be installed before installing the Amazon Timestream ODBC Driver on Ubuntu. +The 32-bit dependencies need to be installed before installing the Database ODBC Driver on Ubuntu. ``` sudo dpkg --add-architecture i386 @@ -50,22 +50,22 @@ You may also want to install [isql32](./tools/isql32) for testing. In the direct * Type `quit` to exit interactive mode. What needs to be installed to run? -1. Run `sudo dpkg -i ./AmazonTimestreamODBC_[version]_i386.deb` to install the Amazon Timestream ODBC Driver. +1. Run `sudo dpkg -i ./DatabaseODBC_[version]_i386.deb` to install the Database ODBC Driver. 2. [Configure the Driver and DSN entries](./docs/user/linux_configure_dsn.md). ### Installing the 64-bit deb file on Ubuntu 20.04 -unixODBC should be installed before installing the Amazon Timestream ODBC Driver on Ubuntu. +unixODBC should be installed before installing the Database ODBC Driver on Ubuntu. ``` sudo apt update sudo apt install unixodbc ``` -1. Run `sudo dpkg -i ./AmazonTimestreamODBC_[version]_amd64.deb` to install the Amazon Timestream ODBC Driver. +1. Run `sudo dpkg -i ./DatabaseODBC_[version]_amd64.deb` to install the Database ODBC Driver. 2. [Configure the Driver and DSN entries](./docs/user/linux_configure_dsn.md). ### Installing the 32-bit rpm file on Amazon Linux 2 -The 32-bit dependencies need to be installed before installing the Amazon Timestream ODBC Driver on Amazon Linux 2. +The 32-bit dependencies need to be installed before installing the Database ODBC Driver on Amazon Linux 2. ``` sudo yum update @@ -79,17 +79,17 @@ You may also want to install [isql32](./tools/isql32) for testing. In the direct * Type `quit` to exit interactive mode. What needs to be installed to run? -1. Run `sudo rpm -U AmazonTimestreamODBC_[version]_i386.rpm` to install the Amazon Timestream ODBC Driver. +1. Run `sudo rpm -U DatabaseODBC_[version]_i386.rpm` to install the Database ODBC Driver. 2. [Configure the Driver and DSN entries](./docs/user/linux_configure_dsn.md). ### Installing the 64-bit rpm file on Amazon Linux 2 -unixODBC should be installed before installing the Amazon Timestream ODBC Driver on Amazon Linux 2. +unixODBC should be installed before installing the Database ODBC Driver on Amazon Linux 2. ``` sudo yum update sudo yum install unixODBC ``` -1. Run `sudo rpm -U AmazonTimestreamODBC_[version]_x86_64.rpm` to install the Amazon Timestream ODBC Driver. +1. Run `sudo rpm -U DatabaseODBC_[version]_x86_64.rpm` to install the Database ODBC Driver. 2. [Configure the Driver and DSN entries](./docs/user/linux_configure_dsn.md). ## Using the Driver @@ -99,10 +99,10 @@ The driver comes in the form of a library file: * Mac: `libodbcdriver.dylib` * Linux: `libodbcdriver.so` -If using with ODBC compatible BI tools, refer to the tool documentation on configuring a new ODBC driver. In most cases, you will need to make the tool aware of the location of the driver library file and then use it to setup Amazon Timestream database connections. +If using with ODBC compatible BI tools, refer to the tool documentation on configuring a new ODBC driver. In most cases, you will need to make the tool aware of the location of the driver library file and then use it to setup Database database connections. ### Excel -The Amazon Timestream ODBC driver supports both the Windows and macOS versions of Microsoft Excel. +The Database ODBC driver supports both the Windows and macOS versions of Microsoft Excel. * [Microsoft Excel for Windows](./docs/user/microsoft_excel_support_win.md); or * [Microsoft Excel for macOS](./docs/user/microsoft_excel_support_mac.md); @@ -114,7 +114,7 @@ A list of options available for configuring driver behaviour is available [here] To setup a connection, the driver uses an ODBC connection string. Connection strings are semicolon-delimited strings specifying the set of options to use for a connection. Typically, a connection string will either: * specify a Data Source Name containing a pre-configured set of options (`DSN=xxx;`); or -* configure options explicitly using the connection string (`Region=xxx;Auth=xxx;LogLevel=7;...`) +* configure options explicitly using the connection string (`UID=xxx;PWD=xxx;Auth=xxx;LogLevel=7;...`) ### Enable ODBC Driver Manager Tracing #### Windows @@ -144,7 +144,7 @@ TraceFile = /tmp/odbctrace.out ### Troubleshooting **Illegal parameter value for SQL_AUTOCOMMIT** -By default, the Amazon Timestream ODBC Driver sets `SQL_AUTOCOMMIT=OFF`. pyodbc.connect overrides this and sets the value to `ON`. +By default, the Database ODBC Driver sets `SQL_AUTOCOMMIT=OFF`. pyodbc.connect overrides this and sets the value to `ON`. To resolve the issue, excitly set the value `pyodbc.connect(connstr,autocommit=True)` diff --git a/build_linux_debug64.sh b/build_linux_debug64.sh index 016ac042f..bf96660ad 100755 --- a/build_linux_debug64.sh +++ b/build_linux_debug64.sh @@ -7,7 +7,7 @@ cd aws-sdk-cpp mkdir install mkdir build cd build -cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Debug" -DBUILD_ONLY="core;sts;timestream-query" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" +cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Debug" -DBUILD_ONLY="core;sts" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" make -j 4 make install cd ../../../ diff --git a/build_linux_release32_deb.sh b/build_linux_release32_deb.sh index b2c85c5be..a37b7cc99 100755 --- a/build_linux_release32_deb.sh +++ b/build_linux_release32_deb.sh @@ -8,7 +8,7 @@ cd aws-sdk-cpp mkdir install mkdir build cd build -cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts;timestream-query" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -DCPP_STANDARD="17" +cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -DCPP_STANDARD="17" make -j 4 make install cd ../../../ diff --git a/build_linux_release32_rpm.sh b/build_linux_release32_rpm.sh index 3d8415b47..7a9eb01a8 100755 --- a/build_linux_release32_rpm.sh +++ b/build_linux_release32_rpm.sh @@ -8,7 +8,7 @@ cd aws-sdk-cpp mkdir install mkdir build cd build -cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts;timestream-query" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -DCMAKE_C_STANDARD="99" -DCPP_STANDARD="11" +cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -DCMAKE_C_STANDARD="99" -DCPP_STANDARD="11" make -j 4 make install cd ../../../ diff --git a/build_linux_release64_deb.sh b/build_linux_release64_deb.sh index 77d83468e..a9c2cedb9 100755 --- a/build_linux_release64_deb.sh +++ b/build_linux_release64_deb.sh @@ -7,7 +7,7 @@ cd aws-sdk-cpp mkdir install mkdir build cd build -cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts;timestream-query" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" +cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" make -j 4 make install cd ../../../ diff --git a/build_linux_release64_rpm.sh b/build_linux_release64_rpm.sh index ecda48b0e..889fe4b54 100755 --- a/build_linux_release64_rpm.sh +++ b/build_linux_release64_rpm.sh @@ -7,7 +7,7 @@ cd aws-sdk-cpp mkdir install mkdir build cd build -cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts;timestream-query" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" +cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" make -j 4 make install cd ../../../ diff --git a/build_mac_debug64.sh b/build_mac_debug64.sh index 42f65e407..321b473be 100755 --- a/build_mac_debug64.sh +++ b/build_mac_debug64.sh @@ -7,7 +7,7 @@ cd aws-sdk-cpp mkdir install mkdir build cd build -cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Debug" -DBUILD_ONLY="core;sts;timestream-query" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" +cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Debug" -DBUILD_ONLY="core;sts" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" make -j 4 make install cd ../../../ diff --git a/build_mac_release64.sh b/build_mac_release64.sh index 6cac60b27..825391418 100755 --- a/build_mac_release64.sh +++ b/build_mac_release64.sh @@ -7,7 +7,7 @@ cd aws-sdk-cpp mkdir install mkdir build cd build -cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts;timestream-query" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" +cmake ../ -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE="Release" -DBUILD_ONLY="core;sts" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_TESTING="OFF" -DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" make -j 4 make install cd ../../../ diff --git a/docs/dev/BUILD_INSTRUCTIONS.md b/docs/dev/BUILD_INSTRUCTIONS.md index 33202110d..a93f719c2 100644 --- a/docs/dev/BUILD_INSTRUCTIONS.md +++ b/docs/dev/BUILD_INSTRUCTIONS.md @@ -1,18 +1,18 @@ -# Amazon Timestream ODBC Driver Build Instructions +# Database ODBC Driver Build Instructions ## Windows -* [Building the Amazon Timestream ODBC Driver](./build_win.md) -* [Running the Amazon Timestream ODBC Driver Automated Tests](./run_tests_win.md) +* [Building the Database ODBC Driver](./build_win.md) +* [Running the Database ODBC Driver Automated Tests](./run_tests_win.md) * [Configuring a DSN](../user/windows_configure_dsn.md) ## Mac -* [Building the Amazon Timestream ODBC Driver](./build_mac.md) -* [Running the Amazon Timestream ODBC Driver Automated Tests](./run_tests_mac.md) +* [Building the Database ODBC Driver](./build_mac.md) +* [Running the Database ODBC Driver Automated Tests](./run_tests_mac.md) * [Configuring a DSN](../user/mac_configure_dsn.md) ## Linux -* [Building the Amazon Timestream ODBC Driver](./build_linux.md) -* [Running the Amazon Timestream ODBC Driver Automated Tests](./run_tests_linux.md) +* [Building the Database ODBC Driver](./build_linux.md) +* [Running the Database ODBC Driver Automated Tests](./run_tests_linux.md) * [Configuring a DSN](../user/linux_configure_dsn.md) ## Power BI Connector diff --git a/docs/dev/build_linux.md b/docs/dev/build_linux.md index a119aeae4..b6b1f27ee 100644 --- a/docs/dev/build_linux.md +++ b/docs/dev/build_linux.md @@ -1,4 +1,4 @@ -# Linux - Building the Amazon Timestream ODBC Driver +# Linux - Building the Database ODBC Driver ## Dependencies @@ -38,7 +38,7 @@ sudo make install cd .. ``` -## Building the Amazon Timestream ODBC Driver for Amazon Linux 2 32-bit +## Building the Database ODBC Driver for Amazon Linux 2 32-bit *Note:* The Amazon Linux 32-bit driver cannot be built as part of GitHub Actions as there is no supported hosted runner. In order to build the 32-bit driver, a Centos 7 machine environment needs to be used. The following instructions are for using a CentOS docker image. 1. Install Docker @@ -74,7 +74,7 @@ git clone ``` 6. Build the driver ``` -cd timestream-odbc +cd database-odbc sh build_linux_release32_rpm.sh ``` *Note:* There is an error in the AWS SDK in [AWSError.h](https://github.com/aws/aws-sdk-cpp/blob/4804f46df31b7539021237c62d79c54d6429a0c4/aws-cpp-sdk-core/include/aws/core/client/AWSError.h). [Line 95](https://github.com/aws/aws-sdk-cpp/blob/4804f46df31b7539021237c62d79c54d6429a0c4/aws-cpp-sdk-core/include/aws/core/client/AWSError.h#L95) will trigger a warning since "other" is unused which will break the build. To resolve this, use a text editor, such as `vi`, to replace `AWSError& operator=(AWSError&& other) = default;` with `AWSError& operator=(AWSError&& ) = default; ` @@ -89,10 +89,10 @@ cpack . ``` 8. From the host machine, copy the installer from the Docker image ``` -docker cp [container]://timestream-odbc/cmake-build32/AmazonTimestreamODBC_[version]_i386.rpm [local path] +docker cp [container]://database-odbc/cmake-build32/DatabaseODBC_[version]_i386.rpm [local path] ``` -## Building the Amazon Timestream ODBC Driver for Ubuntu 64-bit, Ubuntu 32-bit or Amazon Linux 2 64-bit +## Building the Database ODBC Driver for Ubuntu 64-bit, Ubuntu 32-bit or Amazon Linux 2 64-bit From the Unix shell, navigate to the project source directory, run one of the following: * `./build_linux_debug64.sh` @@ -120,4 +120,4 @@ make cpack . ``` -An installer named `AmazonTimestreamODBC-_` will be generated in the build directory (for example `AmazonTimestreamODBC_1.0.0_x86_64.rpm` will be created in `cmake-build64`). +An installer named `DatabaseODBC-_` will be generated in the build directory (for example `DatabaseODBC_1.0.0_x86_64.rpm` will be created in `cmake-build64`). diff --git a/docs/dev/build_mac.md b/docs/dev/build_mac.md index ab1035368..d23ac69ff 100644 --- a/docs/dev/build_mac.md +++ b/docs/dev/build_mac.md @@ -1,4 +1,4 @@ -# macOS - Building the Amazon Timestream ODBC Driver +# macOS - Building the Database ODBC Driver ## Dependencies @@ -38,4 +38,4 @@ make cpack . ``` -An installer named `AmazonTimestreamODBC-.pkg` will be generated in the build directory (for example `AmazonTimestreamODBC_1.0.0.pkg` will be created in `cmake-build64`). +An installer named `DatabaseODBC-.pkg` will be generated in the build directory (for example `DatabaseODBC_1.0.0.pkg` will be created in `cmake-build64`). diff --git a/docs/dev/build_powerbi_connector.md b/docs/dev/build_powerbi_connector.md index 9632369e4..ff49cf860 100644 --- a/docs/dev/build_powerbi_connector.md +++ b/docs/dev/build_powerbi_connector.md @@ -1,17 +1,17 @@ -# Building the Amazon Timestream Power BI Connector +# Building the Database Power BI Connector -The connector file `AmazonTimestreamConnector.mez` is a ZIP archive containing the power query files. +The connector file `DatabaseConnector.mez` is a ZIP archive containing the power query files. ## Prerequisites 1. Install Visual Studio 2019. 2. Install the [Power Query SDK](https://marketplace.visualstudio.com/items?itemName=Dakahn.PowerQuerySDK). 3. Setup AWS IAM Credentials or AWS Profile authentication -4. An Amazon Timestream sample database called `PowerBI` containing the `DevOps` table. +4. An Database sample database called `PowerBI` containing the `DevOps` table. ## Running the Tests -1. Load the `src\PowerBIConnector\AmazonTimestreamConnector\AmazonTimestreamConnector.mproj` file from the project directory. +1. Load the `src\PowerBIConnector\DatabaseConnector\DatabaseConnector.mproj` file from the project directory. * Visual Studio may complain about the project not being able to load properly, right click on the solution and reload the project. This is related to tooling in the Power Query SDK. -2. Edit the AmazonTimestreamConnector.query.pq file and set `Region` to the region where the `PowerBI` database is located. +2. Edit the DatabaseConnector.query.pq file and set `Region` to the region where the `PowerBI` database is located. * If you are using `AWS Profile` authentication and not using `default`, enter the `Profile Name`. * If you are using `AWS IAM Credentials` authentication and multi-factor authentication, enter the `AWS IAM Session Token`. 3. Run the project. The first time, you will be asked to enter your credential information. Select `Anonymous` for `AWS Profile` authentication, or `UsernamePassword` for `AWS IAM Credentials` authentication. Click `Set Credential` and close the `M Query Output` window. @@ -21,4 +21,4 @@ The connector file `AmazonTimestreamConnector.mez` is a ZIP archive containing t 4. Run the project to view the test results. ## Rebuilding the Connector -* Run `.\AmazonTimestreamConnector.ps1` from within the `src\PowerBIConnector` directory. The `AmazonTimestreamConnector.mez` file will be created which can then be copied to the `\Documents\Power BI Desktop\Custom Connectors` directory (or to `\OneDrive\Documents\Power BI Desktop\Custom Connectors` if using OneDrive). To use the connector with the `On-premises data gateway`, it should also be copied to `C:\Windows\ServiceProfiles\PBIEgwService\Documents`. +* Run `.\DatabaseConnector.ps1` from within the `src\PowerBIConnector` directory. The `DatabaseConnector.mez` file will be created which can then be copied to the `\Documents\Power BI Desktop\Custom Connectors` directory (or to `\OneDrive\Documents\Power BI Desktop\Custom Connectors` if using OneDrive). To use the connector with the `On-premises data gateway`, it should also be copied to `C:\Windows\ServiceProfiles\PBIEgwService\Documents`. diff --git a/docs/dev/build_win.md b/docs/dev/build_win.md index 1fc04a2c1..f203a3ad6 100644 --- a/docs/dev/build_win.md +++ b/docs/dev/build_win.md @@ -1,4 +1,4 @@ -# Windows - Building the Amazon Timestream ODBC Driver +# Windows - Building the Database ODBC Driver ## Dependencies @@ -6,7 +6,7 @@ * Install Desktop development with C++ * Check "C++ MFC for latest vXXX build tools" * Install ClangFormat Extension from the Extensions menu in Visual Studio or from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat). -* [Amazon Timestream ODBC Driver source code](https://github.com/Bit-Quill/timestream-odbc) +* [Database ODBC Driver source code](TODO add link github) * [Git](https://git-scm.com/download/win) * Ensure that the PATH environment variable contains the path to git executable. Default is `C:\Program Files\Git\cmd`. * [CMake](https://cmake.org/install/). This is installed with Visual Studio. @@ -47,7 +47,7 @@ From Developer Powershell, navigate to the project source directory, run: msbuild .\build\odbc\cmake\PACKAGE.vcxproj -p:Configuration=Release ``` -An installer named `AmazonTimestreamODBC-.msi` will be generated in the `.\build\cmake` directory (for example `AmazonTimestreamODBC64-1.0.0.msi` ). +An installer named `DatabaseODBC-.msi` will be generated in the `.\build\cmake` directory (for example `DatabaseODBC64-1.0.0.msi` ). ### Troubleshooting If you are changing the bitness (32-bit to/from 64-bit), you may need to delete the build directory and rebuild. diff --git a/docs/dev/run_tests.md b/docs/dev/run_tests.md index a02a87466..10c48df39 100644 --- a/docs/dev/run_tests.md +++ b/docs/dev/run_tests.md @@ -1,12 +1,12 @@ -# Amazon Timestream ODBC Driver Automated Tests +# Database ODBC Driver Automated Tests ## Preparation ### Loading Test Datasets -Loading a dataset requires an [Amazon Timestream](https://aws.amazon.com/timestream/) service. If missing, please refer to the documentation on how to set them up. +Loading a dataset requires an [Database](database_link_placeholder) service. If missing, please refer to the documentation on how to set them up. -In order for all of the tests to pass, [create two sample databases](https://docs.aws.amazon.com/timestream/latest/developerguide/getting-started.db-w-sample-data.html#getting-started.db-w-sample-data.using-console) `sampleDB` and `ODBCTest`. If more databases exist for the region, the catalog tests for the region will fail and should be disabled. +In order for all of the tests to pass, [create two sample databases](database_link_database_getting_started) `sampleDB` and `ODBCTest`. If more databases exist for the region, the catalog tests for the region will fail and should be disabled. ``` ./build/odbc/bin/tests --gtest_filter=-'TestSQLTables.*' diff --git a/docs/dev/run_tests_linux.md b/docs/dev/run_tests_linux.md index fed7f86b8..218918d0a 100755 --- a/docs/dev/run_tests_linux.md +++ b/docs/dev/run_tests_linux.md @@ -1,15 +1,14 @@ -# Linux - Running the Amazon Timestream ODBC Driver Automated Tests +# Linux - Running the Database ODBC Driver Automated Tests ## Preparation -See [Running Amazon Timestream Automated Tests](./run_tests.md) for information on how to load the test datasets. +See [Running Database Automated Tests](./run_tests.md) for information on how to load the test datasets. ## Running the Automated Tests **NOTES:** -* The automated tests cannot be run for the 32-bit version of the Timestream ODBC Driver for Amazon Linux 2. To generate the .rpm file, a Docker image must be used which does not support the codecvt import. -* Test DSNs named `timestream-aws-profile`, `timestream-iam`, `timestream-aad` and `timestream-okta` must be set up in order for certain tests to pass. If you do not have Azure AD and Okta setup, exclude the `TestSQLConnectSAMLAuth` and `TestSQLDriverConnectSAMLAuth` tests. +* The automated tests cannot be run for the 32-bit version of the Database ODBC Driver for Amazon Linux 2. To generate the .rpm file, a Docker image must be used which does not support the codecvt import. * If your region contains more databases other than `sampleDB` and `ODBCTest`, the table catalog tests should be disabled. ``` ./build/odbc/bin/tests --gtest_filter=-'TestSQLTables.*' @@ -22,33 +21,18 @@ See [Running Amazon Timestream Automated Tests](./run_tests.md) for information * To create a System DSN, manually add the entries to `/Library/ODBC/odbc.ini`. * To create a User DSN, manually add the entries to `~/Library/ODBC/odbc.ini`. * In the odbc.ini file populate the following settings (See [Configuration Options](../user/configuration_options.md) for more details). - * For `[timestream-iam]`, populate `UID` and `PWD`. - * For `[timestream-aad]`, populate `AADApplicationID`, `AADClientSecret`, `RoleARN`, `AADTenant`, `IdpARN`, `IdpUserName` and `IdpPassword`. - * For `[timestream-okta]`, populate `IdpHost`, `OktaApplicationID`, `RoleARN`, `IdpARN`, `IdpUserName` and `IdpPassword`. 3. Using `iODBC Administrator`, test the connections. -**Note:** You do not need to populate the `[timestream-aad]` or `[timestream-okta]` sections if your database does not have Azure AD or Okta setup and you are skipping the tests. - ### Running Tests from Unix Shell Tests can be executed from the Unix shell. To run all tests, from the project root directory (replacing the values), run:
-export AAD_CONNECT_STRING="[AAD_CONNECT_STRING]"
-export OKTA_CONNECT_STRING="[OKTA_CONNECT_STRING]"
 
 ./build/odbc/bin/tests
 
-**Note:** The AAD_CONNECT_STRING and OKTA_CONNECT_STRING entries should be separated by a ";" without spaces. For example: - -
-export AAD_CONNECT_STRING="Driver=Amazon Timestream ODBC Driver;Region=us-east-1;Auth=AAD;IdpName=AzureAD;AADApplicationID=xxx;AADClientSecret=xxx;RoleARN=xxx;AADTenant=xxx;IdpARN=xxx;IdpUserName=xxx;IdpPassword=xxx"
-
- -To exclude the Okta and Azure Active Directory tests, run: -
-./build/odbc/bin/tests --gtest_filter=-'TestSQLConnectSAMLAuth.*':'TestSQLDriverConnectSAMLAuth.*'
+export AAD_CONNECT_STRING="Driver=Database ODBC Driver;Region=us-east-1;Auth=AAD;IdpName=AzureAD;AADApplicationID=xxx;AADClientSecret=xxx;RoleARN=xxx;AADTenant=xxx;IdpARN=xxx;IdpUserName=xxx;IdpPassword=xxx"
 
To exclude the table catalog tests, run: diff --git a/docs/dev/run_tests_mac.md b/docs/dev/run_tests_mac.md index beade1600..852934d78 100755 --- a/docs/dev/run_tests_mac.md +++ b/docs/dev/run_tests_mac.md @@ -1,14 +1,13 @@ -# macOS - Running the Amazon Timestream ODBC Driver Automated Tests +# macOS - Running the Database ODBC Driver Automated Tests ## Preparation -See [Running Amazon Timestream Automated Tests](./run_tests.md) for information on how to load the test datasets. +See [Running Database Automated Tests](./run_tests.md) for information on how to load the test datasets. ## Running the Automated Tests **NOTES:** -* Test DSNs named `timestream-aws-profile`, `timestream-iam`, `timestream-aad` and `timestream-okta` must be set up in order for certain tests to pass. If you do not have Azure AD and Okta setup, exclude the `TestSQLConnectSAMLAuth` and `TestSQLDriverConnectSAMLAuth` tests. * If your region contains more databases other than `sampleDB` and `ODBCTest`, the table catalog tests should be disabled. ``` ./build/odbc/bin/tests --gtest_filter=-'TestSQLTables.*' @@ -21,34 +20,20 @@ See [Running Amazon Timestream Automated Tests](./run_tests.md) for information * To create a System DSN, manually add the entries to `/Library/ODBC/odbc.ini`. * To create a User DSN, manually add the entries to `~/Library/ODBC/odbc.ini`. * In the odbc.ini file populate the following settings (See [Configuration Options](../user/configuration_options.md) for more details). - * For `[timestream-iam]`, populate `UID` and `PWD`. - * For `[timestream-aad]`, populate `AADApplicationID`, `AADClientSecret`, `RoleARN`, `AADTenant`, `IdpARN`, `IdpUserName` and `IdpPassword`. - * For `[timestream-okta]`, populate `IdpHost`, `OktaApplicationID`, `RoleARN`, `IdpARN`, `IdpUserName` and `IdpPassword`. 3. Using `iODBC Administrator`, test the connections. -**Note:** You do not need to populate the `[timestream-aad]` or `[timestream-okta]` sections if your database does not have Azure AD or Okta setup and you are skipping the tests. - ### Running Tests from Terminal Tests can be executed using a command line interface. To run all tests, from the project root directory (replacing the values), run:
-export AAD_CONNECT_STRING="[AAD_CONNECT_STRING]"
-export OKTA_CONNECT_STRING="[OKTA_CONNECT_STRING]"
 
 ./build/odbc/bin/tests
 
-**Note:** The AAD_CONNECT_STRING and OKTA_CONNECT_STRING entries should be separated by a ";" without spaces. For example: -
-export AAD_CONNECT_STRING="Driver=Amazon Timestream ODBC Driver;Region=us-east-1;Auth=AAD;IdpName=AzureAD;AADApplicationID=xxx;AADClientSecret=xxx;RoleARN=xxx;AADTenant=xxx;IdpARN=xxx;IdpUserName=xxx;IdpPassword=xxx"
+export AAD_CONNECT_STRING="Driver=Database ODBC Driver;Region=us-east-1;Auth=AAD;IdpName=AzureAD;AADApplicationID=xxx;AADClientSecret=xxx;RoleARN=xxx;AADTenant=xxx;IdpARN=xxx;IdpUserName=xxx;IdpPassword=xxx"
 
-To exclude the Okta and Azure Active Directory tests, run: - -
-./build/odbc/bin/tests --gtest_filter=-'TestSQLConnectSAMLAuth.*':'TestSQLDriverConnectSAMLAuth.*'
-
To exclude the table catalog tests, run: diff --git a/docs/dev/run_tests_performance.md b/docs/dev/run_tests_performance.md index a8223d79c..f2c90ebed 100644 --- a/docs/dev/run_tests_performance.md +++ b/docs/dev/run_tests_performance.md @@ -3,8 +3,8 @@ ## Preparation * [Python 3](https://www.python.org/downloads/) is required to run the performance tests. This should also include pip3. -* Setup a database named `ODBCPerfTest` with the table `DevOps`. More than 10,000 should be added using the [continuous ingestor tool](https://github.com/awslabs/amazon-timestream-tools/tree/mainline/tools/continuous-ingestor). Once the data has been ingested into the `DevOps` table, these tests use static queries and do not need to have live data. -* Setup a database named `perfdb_hcltps` with the table `perftable_hcltps`. Data should be ingested into this database for more than one hour using the [continuous ingestor tool](https://github.com/awslabs/amazon-timestream-tools/tree/mainline/tools/continuous-ingestor). This need to be run continuously while running these tests, as they are time sensitive and are based on the current time and the current time - 1 hour. +* Setup a database named `ODBCPerfTest` with the table `DevOps`. More than 10,000 should be added using the [continuous ingestor tool](https://github.com/awslabs/amazon-Database-tools/tree/mainline/tools/continuous-ingestor). Once the data has been ingested into the `DevOps` table, these tests use static queries and do not need to have live data. +* Setup a database named `perfdb_hcltps` with the table `perftable_hcltps`. Data should be ingested into this database for more than one hour using the [continuous ingestor tool](https://github.com/awslabs/amazon-Database-tools/tree/mainline/tools/continuous-ingestor). This need to be run continuously while running these tests, as they are time sensitive and are based on the current time and the current time - 1 hour. ## Running the Automated Tests diff --git a/docs/dev/run_tests_win.md b/docs/dev/run_tests_win.md index bbe1f19df..db8ddc26e 100644 --- a/docs/dev/run_tests_win.md +++ b/docs/dev/run_tests_win.md @@ -1,8 +1,8 @@ -# Windows - Running the Amazon Timestream ODBC Driver Automated Tests +# Windows - Running the Database ODBC Driver Automated Tests ## Preparation -See [Running Amazon Timestream Automated Tests](./run_tests.md) for information on how to load the test datasets. +See [Running Database Automated Tests](./run_tests.md) for information on how to load the test datasets. ## Running the Automated Tests @@ -10,66 +10,19 @@ Tests can be executed directly using **Visual Studio** or through **Developer Po **NOTES:** -* Test DSNs named `timestream-aws-profile`, `timestream-iam`, `timestream-aad` and `timestream-okta` must be set up in order for certain tests to pass. If you do not have Azure AD and Okta setup, exclude the `TestSQLConnectSAMLAuth` and `TestSQLDriverConnectSAMLAuth` tests. * If your region contains more databases other than `sampleDB` and `ODBCTest`, the table catalog tests should be disabled. ``` ./build/odbc/bin/tests --gtest_filter=-'TestSQLTables.*' ``` -### Windows timestream-aws-profile setup. +### Windows database-default setup. 1. Run `ODBC Data Sources (64-bit)`. 2. On the `User DSN` or `System DSN` tab, click `Add...`. -3. Select `Amazon Timestream ODBC Driver` and click `Finish`. -4. Enter `timestream-aws-profile` in the `Data Source Name` field. By default, `Auth` should be set to `AWS Profile` and the `Region` to `us-east-1`. +3. Select `Database ODBC Driver` and click `Finish`. +4. Enter `database-default` in the `Data Source Name` field. By default, `Auth` should be set to `Default`. 5. Click `Test`. You should get a connection successful message. Click `OK` to close the message box. 6. Click `OK` to close the setup dialog. -### Windows timestream-iam setup. -1. Run `ODBC Data Sources (64-bit)`. -2. On the `User DSN` tab, click `Add...`. -3. Select `Amazon Timestream ODBC Driver` and click `Finish`. -4. Enter `timestream-iam` in the `Data Source Name` field. -5. Select `AWS IAM Credentials` in the `Auth` drop-down. -6. Enter the `Access Key ID`, `Secret Access Key` and `Session Token`. By default, the `Region` to `us-east-1`. -5. Click `Test`. You should get a connection successful message. Click `OK` to close the message box. -6. Click `OK` to close the setup dialog. - -### Windows timestream-aad setup. -1. Run `ODBC Data Sources (64-bit)`. -2. On the `User DSN` tab, click `Add...`. -3. Select `Amazon Timestream ODBC Driver` and click `Finish`. -4. Enter `timestream-aad` in the `Data Source Name` field. -5. Select `Identity Provider: Azure AD` in the `Auth` drop-down. -6. Enter the `Role ARN`, `IdP Name`, `IdP Username`, `IdP Password`, `IdP ARN`, `AAD Application ID`, `AAD Client Secret` and `AADTenant`. By default, the `Region` to `us-east-1`. -5. Click `Test`. You should get a connection successful message. Click `OK` to close the message box. -6. Click `OK` to close the setup dialog. - -### Windows timestream-okta setup. -1. Run `ODBC Data Sources (64-bit)`. -2. On the `User DSN` tab, click `Add...`. -3. Select `Amazon Timestream ODBC Driver` and click `Finish`. -4. Enter `timestream-okta` in the `Data Source Name` field. -5. Select `AWS IAM Credentials` in the `Auth` drop-down. -6. Enter the `Role ARN`, `IdP Name`, `IdP Username`, `IdP Password`, `IdP ARN`, `IdP Host` and `Okta Application ID`. By default, the `Region` to `us-east-1`. -5. Click `Test`. You should get a connection successful message. Click `OK` to close the message box. -6. Click `OK` to close the setup dialog. - -### Set the Environment Variables - -In order to successfully run the Okta and Azure AD tests, the AAD_CONNECT_STRING and OKTA_CONNECT_STRING environment variables need to be set. Using Developer Powershell, run the following (replacing the values): - -
-set AAD_CONNECT_STRING="[AAD_CONNECT_STRING]"
-set OKTA_CONNECT_STRING="[OKTA_CONNECT_STRING]"
-
- -**Note:** The AAD_CONNECT_STRING and OKTA_CONNECT_STRING entries should be separated by a ";" without spaces. For example: - -
-set AAD_CONNECT_STRING="Driver=Amazon Timestream ODBC Driver;Region=us-east-1;Auth=AAD;IdpName=AzureAD;AADApplicationID=xxx;AADClientSecret=xxx;RoleARN=xxx;AADTenant=xxx;IdpARN=xxx;IdpUserName=xxx;IdpPassword=xxx"
-
- -**NOTE:** Using `set` will only work for the current terminal session. You can also set the environment variables permanently through `Advanced Settings` in `Control Panel`. ### Running Tests from Visual Studio @@ -88,12 +41,6 @@ Tests can be executed from Developer Powershell. To run all tests, set the AAD_C .\build\odbc\bin\Release\tests -To exclude the Okta and Azure Active Directory tests, run: - -
-.\build\odbc\bin\Release\tests --gtest_filter=-'TestSQLConnectSAMLAuth.*':'TestSQLDriverConnectSAMLAuth.*'
-
- To exclude the table catalog tests, run:
diff --git a/docs/user/configuration_options.md b/docs/user/configuration_options.md
index b60d89f13..25420ceb2 100644
--- a/docs/user/configuration_options.md
+++ b/docs/user/configuration_options.md
@@ -5,7 +5,7 @@ The driver specific options can be set in the `odbcinst.ini` file for macOS or L
 
 | Option | Description | Type | Default |
 |--------|-------------|------|---------------|
-| `Driver` | Driver name.| string | timestreamodbc |
+| `Driver` | Driver name.| string | databaseodbc |
 | `LogLevel` | Severity level for driver logs. | integer
one of `0`(OFF), `1`(FATAL), `2`(ERROR), `3`(WARNING), `4`(INFO), `5`(DEBUG), `6`(TRACE), `7`(ALL) | `0`(OFF) | | `LogOutput` | Location for storing driver logs. | string | WIN: `TEMP environment variable`, MAC/Linux: `/tmp` | @@ -14,54 +14,26 @@ The DSN specific options can be set in the `odbc.ini` file for macOS or Linux, o | Option | Description | Type | Default | |--------|-------------|------|---------------| -| `Driver` | Driver name.| string | timestreamodbc | +| `Driver` | Driver name.| string | Databaseodbc | | `DSN` | **D**ata **S**ource **N**ame used for configuring the connection. | string | `` | -| `Auth` | Authentication mode. | one of `AWS_PROFILE`, `IAM`, `AAD`, `OKTA` | `AWS_PROFILE` +| `Auth` | Authentication mode. | one of `DEFAULT` | `DEFAULT` | `LogLevel` | Severity level for driver logs. | integer
one of `0`(OFF), `1`(FATAL), `2`(ERROR), `3`(WARNING), `4`(INFO), `5`(DEBUG), `6`(TRACE), `7`(ALL) | `0`(OFF) | `0`(OFF) | | `LogOutput` | Location for storing driver logs. | string | WIN: `TEMP environment variable`, MAC/Linux: `/tmp` | **Note:** We recommend setting the LogOutput for the driver (in the `odbcinst.ini` file or registry settings) and not the DSN (in the `odbc.ini` file or registry settings). Otherwise the first log file will live in a temporary folder and the DSN specified LogOutput value will not take effect until the next time the driver is initialized. -#### AWS Profile Authentication Options +#### Database Default Authentication Options | Option | Description | Type | Default | |--------|-------------|------|---------------| | `ProfileName` | Profile name for the AWS credentials. means loading default credential chain. | string | `` | -| `Region` | The database's region. | string |`us-east-1`| -#### AWS IAM Authentication Options +#### Database Default Authentication Options | Option | Description | Type | Default | |--------|-------------|------|---------------| | `UID` | The AWS user access key id.| string | `` | | `PWD` | The AWS user secret access key. | string | `` | -| `SessionToken` | The temporary session token required to access a database with multi-factor authentication (MFA) enabled. | string | `` | -| `Region` | The database's region. | string |`us-east-1`| - -#### SAML-based authenication options for Okta - -| Option | Description | Type | Default | -|--------|-------------|------|---------------| -| `IdpName` | The Identity Provider (Idp) name to use for SAML-based authentication. One of Okta or AzureAD. | string | `` | -| `IdpHost` | The hostname of the specified Idp. | string | `` | -| `UID` / `IdpUserName` | The username for the specified Idp account. | string | `` | -| `PWD` / `IdpPassword` | The password for the specified Idp account. | string | `` | -| `OktaApplicationID` | The unique Okta-provided ID associated with the Timestream application. A place to find the AppId is in the entityID field provided in the application metadata. | string | `` | -| `RoleARN` | The Amazon Resource Name (ARN) of the role that the caller is assuming. | string | `` | -| `IdpARN` | The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the Idp. | string | `` | - -#### SAML-based authenication options for Azure AD - -| Option | Description | Type | Default | -|--------|-------------|------|---------------| -| `IdpName` | The Identity Provider (Idp) name to use for SAML-based authentication. One of Okta or AzureAD. | string | `` | -| `IdpHost` | The hostname of the specified Idp. | string | `` | -| `UID` / `IdpUserName` | The username for the specified Idp account. | string | `` | -| `PWD` / `IdpPassword` | The password for the specified Idp account. | string | `` | -| `AADApplicationID` | The unique id of the registered application on Azure AD. | string | `` | -| `AADClientSecret` | The client secret associated with the registered application on Azure AD used to authorize fetching tokens. | string | `` | -| `AADTenant` | The Azure AD Tenant ID. | string | `` | -| `IdpARN` | The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the Idp. | string | `` | #### AWS SDK Options @@ -70,12 +42,12 @@ The DSN specific options can be set in the `odbc.ini` file for macOS or Linux, o | `RequestTimeout` | The time in milliseconds the AWS SDK will wait for a query request before timing out. Non-positive value disables request timeout. | int | `3000` | | `ConnectionTimeout` | Socket connect timeout. Value must be non-negative. A value of 0 disables socket timeout. | int | `1000` | | `MaxRetryCountClient` | The maximum number of retry attempts for retryable errors with 5XX error codes in the SDK. The value must be non-negative, 0 means no retry. | int | `` | -| `MaxConnections` | The maximum number of allowed concurrently opened HTTP connections to the Timestream service. The value must be positive. | int | `25` | +| `MaxConnections` | The maximum number of allowed concurrently opened HTTP connections to the Database service. The value must be positive. | int | `25` | #### Endpoint Configuration Options | Option | Description | Type | Default | |--------|-------------|------|---------------| -| `EndpointOverride` | The endpoint override for the Timestream service. It overrides the region. It is an advanced option. | string | `` | +| `EndpointOverride` | The endpoint override for the Database service. It overrides the region. It is an advanced option. | string | `` | **NOTE:** Administrative privileges are required to change the value of logging options on Windows / macOS. diff --git a/docs/user/img/timestream_connector_direct_query.png b/docs/user/img/database_connector_direct_query.png similarity index 100% rename from docs/user/img/timestream_connector_direct_query.png rename to docs/user/img/database_connector_direct_query.png diff --git a/docs/user/img/timestream_connector_import.png b/docs/user/img/database_connector_import.png similarity index 100% rename from docs/user/img/timestream_connector_import.png rename to docs/user/img/database_connector_import.png diff --git a/docs/user/linux_configure_dsn.md b/docs/user/linux_configure_dsn.md index 865eb014a..5710fbb48 100644 --- a/docs/user/linux_configure_dsn.md +++ b/docs/user/linux_configure_dsn.md @@ -1,7 +1,7 @@ # Linux - Configuring a DSN ## Prerequisites -In order to use the Timestream ODBC Driver, [unixODBC](http://www.unixodbc.org/) must be installed. +In order to use the Database ODBC Driver, [unixODBC](http://www.unixodbc.org/) must be installed. ### Installing on Ubuntu 64 bit @@ -34,27 +34,27 @@ Use a text editor from the Unix shell to edit the odbcinst.ini file such as vi. `sudo vi /etc/odbcinst.ini` **To add the driver entries:** -1. Add `Amazon Timestream ODBC Driver` in the `[ODBC Drivers]` section. -2. Add the `[Amazon Timestream ODBC Driver]` section. +1. Add `Database ODBC Driver` in the `[ODBC Drivers]` section. +2. Add the `[Database ODBC Driver]` section. #### Sample odbcinst.ini file for 64-bit Linux ``` [ODBC Drivers] -Amazon Timestream ODBC Driver = Installed +Database ODBC Driver = Installed -[Amazon Timestream ODBC Driver] -Driver = /usr/bin/timestream-odbc64/libodbcdriver.so -Setup = /usr/bin/timestream-odbc64/libodbcdriver.so +[Database ODBC Driver] +Driver = /usr/bin/database-odbc64/libodbcdriver.so +Setup = /usr/bin/database-odbc64/libodbcdriver.so ``` #### Sample odbcinst.ini file for 32-bit Linux ``` [ODBC Drivers] -Amazon Timestream ODBC Driver 32 = Installed +Database ODBC Driver 32 = Installed -[Amazon Timestream ODBC Driver 32] -Driver = /usr/bin/timestream-odbc32/libodbcdriver.so -Setup = /usr/bin/timestream-odbc32/libodbcdriver.so +[Database ODBC Driver 32] +Driver = /usr/bin/database-odbc32/libodbcdriver.so +Setup = /usr/bin/database-odbc32/libodbcdriver.so ``` ### Manually editing the odbc.ini file ### @@ -71,67 +71,32 @@ Use a text editor from the Unix shell to edit the odbc.ini file such as vi. See #### Sample odbc.ini file ``` [ODBC Data Sources] -timestream-iam = Amazon Timestream ODBC Driver -timestream-aad = Amazon Timestream ODBC Driver -timestream-okta = Amazon Timestream ODBC Driver -timestream-aws-profile = Amazon Timestream ODBC Driver -timestream-aws-profile-32 = Amazon Timestream ODBC Driver 32 - -[timestream-aws-profile-32] -Driver = Amazon Timestream ODBC Driver 32 -Region = us-east-2 -Auth = AWS_PROFILE - -[timestream-aws-profile] -Driver = Amazon Timestream ODBC Driver -Region = us-east-2 -Auth = AWS_PROFILE - -[timestream-aad] -Driver = Amazon Timestream ODBC Driver -Region = us-east-1 -Auth = AAD -IdpName = AzureAD -AADApplicationID = -AADClientSecret = -RoleARN = -AADTenant = -IdpARN = -IdpUserName = -IdpPassword = - -[timestream-okta] -Driver = Amazon Timestream ODBC Driver -Region = us-east-1 -Auth = OKTA -IdpName = Okta -IdpHost = -OktaApplicationID = -RoleARN = -IdpARN = -IdpUserName = -IdpPassword = - -[timestream-iam] -Driver = Amazon Timestream ODBC Driver -Region = us-east-1 -LogLevel = 0 -Auth = IAM -UID = -PWD = -SessionToken = +database-default = Database ODBC Driver +database-default-32 = Database ODBC Driver 32 + +[database-default-32] +Driver = Database ODBC Driver 32 +Auth = DEFAULT +UID = +PWD = + +[database-default] +Driver = Database ODBC Driver +Auth = DEFAULT +UID = +PWD = ``` ## Testing Connections -### Testing the 64-bit Timestream ODBC Driver for Linux -Use [isql](https://www.systutorials.com/docs/linux/man/1-isql/#:~:text=isql%20is%20a%20command%20line,with%20built%2Din%20Unicode%20support) to test the connections and run a sample query. For example, to connect to the timestream-aws-profile DSN, -* Type `isql timestream-aws-profile` to make a connection and enter interactive mode. +### Testing the 64-bit Database ODBC Driver for Linux +Use [isql](https://www.systutorials.com/docs/linux/man/1-isql/#:~:text=isql%20is%20a%20command%20line,with%20built%2Din%20Unicode%20support) to test the connections and run a sample query. For example, to connect to the database-default DSN, +* Type `isql database-default` to make a connection and enter interactive mode. * Once the SQL prompt appears type a sample query such as `SELECT * FROM sampleDB.IoT`. * Type `quit` to exit interactive mode. -### Testing the 32-bit Timestream ODBC Driver for Linux +### Testing the 32-bit Database ODBC Driver for Linux You can use [isql32](../../tools/isql32) for testing. In the directory where it is located: * Type `chmod +x ./isql32` to make it executable. * Type `./isql32 [DSN]` to make a connection and enter interactive mode. diff --git a/docs/user/mac_configure_dsn.md b/docs/user/mac_configure_dsn.md index 93cb642b9..960e35b04 100644 --- a/docs/user/mac_configure_dsn.md +++ b/docs/user/mac_configure_dsn.md @@ -1,7 +1,7 @@ # macOS - Configuring a DSN ## Prerequisites -In order to use the Timestream ODBC Driver, [iODBC Driver Manager](http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/Downloads) must be installed. +In order to use the Database ODBC Driver, [iODBC Driver Manager](http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/Downloads) must be installed. ## Adding a Driver Entry You can use **iODBC Administrator** which is installed with the iODBC Driver Manager, or manually edit the `odbcinst.ini` file. @@ -13,9 +13,9 @@ To give the application permission to save the Driver & DSN configurations, run 1. Go to the **ODBC Drivers** tab. 2. Click **Add a driver**. - * **Description of the Driver**: The driver name used for ODBC connections (ex. `Amazon Timestream ODBC Driver`) - * **Driver File Name**: The path to the driver file (default installed path: `/Library/ODBC/timestream-odbc/bin/libodbcdriver.dylib`) - * **Setup File Name**: The path to the driver file (default installed path: `/Library/ODBC/timestream-odbc/bin/libodbcdriver.dylib`) + * **Description of the Driver**: The driver name used for ODBC connections (ex. `Database ODBC Driver`) + * **Driver File Name**: The path to the driver file (default installed path: `/Library/ODBC/database-odbc/bin/libodbcdriver.dylib`) + * **Setup File Name**: The path to the driver file (default installed path: `/Library/ODBC/database-odbc/bin/libodbcdriver.dylib`) * Set as a **System** driver * Below is a screenshot of how the final screen should look. 3. Click **OK** to save the options. @@ -34,16 +34,16 @@ Use a text editor from Terminal to edit the odbcinst.ini file such as vi. `vi ~/Library/ODBC/odbcinst.ini` **To add the driver entries:** -1. Add `Amazon Timestream ODBC Driver` in the `[ODBC Drivers]` section. -2. Add the `[Amazon Timestream ODBC Driver]` section. +1. Add `Database ODBC Driver` in the `[ODBC Drivers]` section. +2. Add the `[Database ODBC Driver]` section. #### Sample odbcinst.ini file ``` [ODBC Drivers] -Amazon Timestream ODBC Driver = Installed +Database ODBC Driver = Installed -[Amazon Timestream ODBC Driver] -Driver = /Library/ODBC/timestream-odbc/bin/libodbcdriver.dylib +[Database ODBC Driver] +Driver = /Library/ODBC/database-odbc/bin/libodbcdriver.dylib ``` ## Adding a DSN Entry @@ -57,8 +57,8 @@ To give the application permission to save the Driver & DSN configurations, run 1. Go to the **Users** tab to create an entry that only you can use or to the **System** tab to create an entry for all users. 2. Select **Add** on the right side of the window. - * Choose the Driver you added above (e.g. Amazon Timestream ODBC Driver). - * **Data Source Name (DSN)**: The name of the DSN used to store connection options (e.g. `AWS Timestream ODBC DSN`) + * Choose the Driver you added above (e.g. Database ODBC Driver). + * **Data Source Name (DSN)**: The name of the DSN used to store connection options (e.g. `AWS Database ODBC DSN`) * **Comment**: Not required * Add key-value pairs by using the **'+'** button. See the sample [odbc.ini](#odbc_data_source) file below for entries for each authentication type. 3. Click **OK** to save the DSN configuration. @@ -87,49 +87,20 @@ Use a text editor from Terminal to edit the odbc.ini file such as vi. See [Confi #### Sample odbc.ini file ``` [ODBC Data Sources] -timestream-iam-profile = Amazon Timestream ODBC Driver -timestream-aad-profile = Amazon Timestream ODBC Driver -timestream-okta-profile = Amazon Timestream ODBC Driver -timestream-aws-profile = Amazon Timestream ODBC Driver - -[timestream-aws-profile] -Driver = Amazon Timestream ODBC Driver -Region = us-east-2 -Auth = AWS_PROFILE - -[timestream-aad-profile] -Driver = Amazon Timestream ODBC Driver -Region = us-east-1 -Auth = AAD -IdpName = AzureAD -AADApplicationID = -AADClientSecret = -RoleARN = -AADTenant = -IdpARN = -IdpUserName = -IdpPassword = - -[timestream-okta-profile] -Driver = Amazon Timestream ODBC Driver -Region = us-east-1 -Auth = OKTA -IdpName = Okta -IdpHost = -OktaApplicationID = -RoleARN = -IdpARN = -IdpUserName = -IdpPassword = - -[timestream-iam-profile] -Driver = Amazon Timestream ODBC Driver -Region = us-east-1 -LogLevel = 0 -Auth = IAM -UID = -PWD = -SessionToken = +database-default = Database ODBC Driver +database-default-32 = Database ODBC Driver 32 + +[database-default-32] +Driver = Database ODBC Driver 32 +Auth = DEFAULT +UID = +PWD = + +[database-default] +Driver = Database ODBC Driver +Auth = DEFAULT +UID = +PWD = ``` ## Troubleshooting diff --git a/docs/user/microsoft_excel_support_mac.md b/docs/user/microsoft_excel_support_mac.md index e627798f5..e9fdd01ba 100644 --- a/docs/user/microsoft_excel_support_mac.md +++ b/docs/user/microsoft_excel_support_mac.md @@ -3,8 +3,8 @@ ## Prerequisites * Microsoft Excel 2016 and higher -* [Amazon Timestream](https://aws.amazon.com/timestream/) -* Amazon Timestream ODBC driver +* [Database](TODO add link to database webpage) +* Database ODBC driver * A preconfigured [User or System DSN](mac_configure_dsn.md) ## Loading Data @@ -39,4 +39,4 @@ The data will be exported to selected location in CSV format. ## Troubleshooting * You may need to remove `;` from SQL statement to load data preview. -* **AWS Profile** authentication is not supported in Excel for Mac. We recommend using IAM authentication and populating the AWS Access Key ID, AWS Secret Access Key and AWS SessionToken in the `odbc.ini` file from the values in the `~/.aws/credentials` file. +* **Default** authentication is not supported in Excel for Mac. diff --git a/docs/user/microsoft_excel_support_win.md b/docs/user/microsoft_excel_support_win.md index 621c89fad..014dcea9e 100644 --- a/docs/user/microsoft_excel_support_win.md +++ b/docs/user/microsoft_excel_support_win.md @@ -3,8 +3,8 @@ ## Prerequisites * Microsoft Excel 2016 and higher -* [Amazon Timestream](https://aws.amazon.com/timestream/) -* Amazon Timestream ODBC driver +* [Database](TODO add database webpage) +* Database ODBC driver * A preconfigured [User or System DSN](windows_configure_dsn.md) ## Loading Data @@ -12,7 +12,7 @@ * Open a blank workbook in Microsoft Excel. * Click on **Data** > **Get Data** > **From Other Sources** > **From ODBC** * Select the desired data source. For improved performance you may want to enter a query directly in **Advanced options** and limit the results returned. For example `SELECT * FROM sampleDB.IoT LIMIT 10000`. Click **OK**. -* For `AWS IAM Credentials`, `Identity Provider: Azure AD` or `Identity Provider: Okta connetions`, select **Database** from the left menu and enter a **User name** and **Password**. For AWS Profile connections, Select **Default or Custom** from the left menu. Click **Connect**. +* For `Default` , select **Database** from the left menu and enter a **User name** and **Password**. Click **Connect**. * If you did not enter a query, select a table from list to load data preview; otherwise the preview will display automatically. Click **Load**. * The data will be loaded in the spreadsheet. diff --git a/docs/user/powerbi_ODBC.md b/docs/user/powerbi_ODBC.md index 4ef85e13d..3c47ef78b 100644 --- a/docs/user/powerbi_ODBC.md +++ b/docs/user/powerbi_ODBC.md @@ -9,7 +9,7 @@ Before you get started, [configure the Amazon Timestream ODBC driver DSN](./wind -2. Select the DSN from the `Data source name (DSN)` drop-down box (e.g. timestream-aws-profile) and click `OK`. +2. Select the DSN from the `Data source name (DSN)` drop-down box (e.g. timestream-default) and click `OK`. diff --git a/docs/user/windows_configure_dsn.md b/docs/user/windows_configure_dsn.md index 48d2a486b..27b6e53c9 100644 --- a/docs/user/windows_configure_dsn.md +++ b/docs/user/windows_configure_dsn.md @@ -6,7 +6,7 @@ -2. Select `Amazon Timestream ODBC Driver` and click on `Finish`. +2. Select `Database ODBC Driver` and click on `Finish`. diff --git a/scripts/build_aws-sdk-cpp.ps1 b/scripts/build_aws-sdk-cpp.ps1 index 90b5daf52..ba63cffaf 100644 --- a/scripts/build_aws-sdk-cpp.ps1 +++ b/scripts/build_aws-sdk-cpp.ps1 @@ -18,7 +18,7 @@ cmake $SRC_DIR ` -A $WIN_ARCH ` -D CMAKE_INSTALL_PREFIX=$INSTALL_DIR ` -D CMAKE_BUILD_TYPE=$CONFIGURATION ` - -D BUILD_ONLY="core;sts;timestream-query" ` + -D BUILD_ONLY="core;sts" ` -D ENABLE_UNITY_BUILD="ON" ` -D CUSTOM_MEMORY_MANAGEMENT="OFF" ` -D ENABLE_RTTI="OFF" ` diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9d0cc4a13..164678361 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -78,9 +78,9 @@ set(IT_HELPER "${TESTS}/ITODBCHelper") set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) if (WIN32) - find_package(AWSSDK REQUIRED core sts timestream-query) + find_package(AWSSDK REQUIRED core sts ) else() - find_package(AWSSDK REQUIRED COMPONENTS core sts timestream-query PATHS aws-sdk-cpp/install NO_DEFAULT_PATH) + find_package(AWSSDK REQUIRED COMPONENTS core sts PATHS aws-sdk-cpp/install NO_DEFAULT_PATH) # Require at least gcc 4.9 for regex support if((NOT APPLE) AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)) find_package(Boost) diff --git a/src/DSNInstaller/dsn_installer.cpp b/src/DSNInstaller/dsn_installer.cpp index 6c12c09e0..68828cd1a 100644 --- a/src/DSNInstaller/dsn_installer.cpp +++ b/src/DSNInstaller/dsn_installer.cpp @@ -28,9 +28,9 @@ // maintain null characters. using namespace std::string_literals; -std::wstring driver_name = L"TIMESTREAM SQL ODBC Driver"; +std::wstring driver_name = L"DATABASE SQL ODBC Driver"; std::wstring driver_filename = L"libodbcdriver.dylib"; -std::wstring dsn_name = L"TIMESTREAM SQL ODBC DSN"; +std::wstring dsn_name = L"DATABASE SQL ODBC DSN"; std::wstring dsn_ini_filename = L"odbcdriver.ini"; std::wstring driver_name_placeholder = L"%DRIVER_NAME%"; diff --git a/src/PerformanceTests/PTODBCExecution/performance_odbc_execution.cpp b/src/PerformanceTests/PTODBCExecution/performance_odbc_execution.cpp index 280c6f4ed..6cf2a3325 100644 --- a/src/PerformanceTests/PTODBCExecution/performance_odbc_execution.cpp +++ b/src/PerformanceTests/PTODBCExecution/performance_odbc_execution.cpp @@ -25,7 +25,7 @@ // clang-format on #define IT_SIZEOF(x) (NULL == (x) ? 0 : (sizeof((x)) / sizeof((x)[0]))) #define ITERATION_COUNT 12 -test_string dsn_conn_string = CREATE_STRING("DSN=timestream-aws-profile"); +test_string dsn_conn_string = CREATE_STRING("DSN=database-default"); const wchar_t* const query = L"SELECT * FROM ODBCTest.IoT limit 10000"; int Setup(SQLHENV* env, SQLHDBC* conn, SQLHSTMT* hstmt) { diff --git a/src/TestRunner/mako_template.html b/src/TestRunner/mako_template.html index 250fdd956..c17ef62c4 100644 --- a/src/TestRunner/mako_template.html +++ b/src/TestRunner/mako_template.html @@ -17,7 +17,7 @@ - Timestream ODBC Driver Test Results + Database ODBC Driver Test Results