Skip to content

Commit

Permalink
Merge pull request #2676 from szarnyasg/odbc-nits
Browse files Browse the repository at this point in the history
Fix nits on the ODBC pages
  • Loading branch information
szarnyasg authored Apr 4, 2024
2 parents 18e7d82 + 4b74493 commit d83cda9
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 85 deletions.
35 changes: 14 additions & 21 deletions docs/api/odbc/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ sudo yum install unixODBC

DuckDB releases the ODBC driver as asset. For linux, download it from <a href="https://github.com/duckdb/duckdb/releases/download/v{{ site.currentduckdbversion }}/duckdb_odbc-linux-amd64.zip">ODBC Linux Asset</a> that contains the following artifacts:

**libduckdb_odbc.so**: the DuckDB driver compiled to Ubuntu 16.04.

**unixodbc_setup.sh**: a setup script to aid the configuration on Linux.
* `libduckdb_odbc.so`: the DuckDB driver compiled to Ubuntu 16.04.
* `unixodbc_setup.sh`: a setup script to aid the configuration on Linux.

## Step 2: Extracting ODBC Artifacts

Expand All @@ -43,7 +42,7 @@ It is based on the unixODBC package that provides some commands to handle the OD

In a terminal window, change to the `duckdb_odbc` permanent directory, and run the following commands with level options `-u` or `-s` either to configure DuckDB ODBC.

### User-Level ODBC Setup (**-u**)
### User-Level ODBC Setup (`-u`)

The `-u` option based on the user home directory to setup the ODBC init files.

Expand All @@ -53,17 +52,17 @@ The `-u` option based on the user home directory to setup the ODBC init files.

The default configuration consists of a database `:memory:`.

### System-Level ODBC setup (**-s**)
### System-Level ODBC setup (`-s`)

The **-s** changes the system level files that will be visible for all users, because of that it requires root privileges.
The `-s` option changes the system level files that will be visible for all users, because of that it requires root privileges.

```bash
sudo unixodbc_setup.sh -s
```

The default configuration consists of a database `:memory:`.

### Show Usage (**--help**)
### Show Usage (`--help`)

The option `--help` shows the usage of `unixodbc_setup.sh` that provides alternative options for a customer configuration, like `-db` and `-D`.

Expand Down Expand Up @@ -103,11 +102,9 @@ Driver = DuckDB Driver
Database = :memory:
```

**[DuckDB]**: between the brackets is a DSN for the DuckDB.

**Driver**: it describes the driver's name, and other configurations will be placed at the **.odbcinst.ini**.

**Database**: it describes the database name used by DuckDB, and it can also be a file path to a `.db` in the system.
* `[DuckDB]`: between the brackets is a DSN for the DuckDB.
* `Driver`: it describes the driver's name, and other configurations will be placed at the `.odbcinst.ini`.
* `Database`: it describes the database name used by DuckDB, and it can also be a file path to a `.db` in the system.

### The `.odbcinst.ini` File

Expand All @@ -125,12 +122,8 @@ TraceFile = /tmp/odbctrace
Driver = /home/⟨user⟩/duckdb_odbc/libduckdb_odbc.so
```

**[ODBC]**: it is the DM configuration section.

**Trace**: it enables the ODBC trace file using the option `yes`.

**TraceFile**: the absolute system file path for the ODBC trace file.

**[DuckDB Driver]**: the section of the DuckDB installed driver.

**Driver**: the absolute system file path of the DuckDB driver.
* `[ODBC]`: it is the DM configuration section.
* `Trace`: it enables the ODBC trace file using the option `yes`.
* `TraceFile`: the absolute system file path for the ODBC trace file.
* `[DuckDB Driver]`: the section of the DuckDB installed driver.
* `Driver`: the absolute system file path of the DuckDB driver.
4 changes: 2 additions & 2 deletions docs/api/odbc/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ brew install unixodbc

DuckDB releases the ODBC driver as asset. For macOS, download it from the <a href="https://github.com/duckdb/duckdb/releases/download/v{{ site.currentduckdbversion }}/duckdb_odbc-osx-universal.zip">ODBC macOS asset</a> that contains the following artifacts:

**libduckdb_odbc.dylib**: the DuckDB ODBC driver compiled to macOS (with Intel and Apple Silicon support).
`libduckdb_odbc.dylib`: the DuckDB ODBC driver compiled to macOS (with Intel and Apple Silicon support).

## Step 2: Extracting ODBC Artifacts

Expand Down Expand Up @@ -54,7 +54,7 @@ allow_unsigned_extensions=true
```

* `[DuckDB]`: between the brackets is a DSN for the DuckDB.
* `Driver`: Describes the driver's name, as well as where to find the configurations in the **.odbcinst.ini**.
* `Driver`: Describes the driver's name, as well as where to find the configurations in the `.odbcinst.ini`.
* `Database`: Describes the database name used by DuckDB, can also be a file path to a `.db` in the system.
* `access_mode`: The mode in which to connect to the database
* `allow_unsigned_extensions`: Allow the use of unsigned extensions
Expand Down
1 change: 0 additions & 1 deletion docs/api/odbc/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ The ODBC API consists of the Driver Manager (DM) and the ODBC drivers.

The DM is part of the system library, e.g., unixODBC, which manages the communications between the user applications and the ODBC drivers.
Typically, applications are linked against the DM, which uses Data Source Name (DSN) to look up the correct ODBC driver.
<!--- with dynamically linkage call the ODBC driver. -->

The ODBC driver is a DBMS implementation of the ODBC API, which handles all the internals of that DBMS.

Expand Down
9 changes: 3 additions & 6 deletions docs/api/odbc/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ The Microsoft Windows requires an ODBC Driver Manager to manage communication be
The DM on Windows is provided in a DLL file `odbccp32.dll`, and other files and tools.
For detailed information check out the [Common ODBC Component Files](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/odbc/dn170563(v=vs.85)).


## Step 1: Download ODBC Driver

DuckDB releases the ODBC driver as asset. For Windows, download it from <a href="https://github.com/duckdb/duckdb/releases/download/v{{ site.currentduckdbversion }}/duckdb_odbc-windows-amd64.zip">Windows Asset</a> that contains the following artifacts:

**duckdb_odbc.dll**: the DuckDB driver compiled for Windows.

**duckdb_odbc_setup.dll**: a setup DLL used by the Windows ODBC Data Source Administrator tool.

**odbc_install.exe**: an installation script to aid the configuration on Windows.
* `duckdb_odbc.dll`: the DuckDB driver compiled for Windows.
* `duckdb_odbc_setup.dll`: a setup DLL used by the Windows ODBC Data Source Administrator tool.
* `odbc_install.exe`: an installation script to aid the configuration on Windows.

## Step 2: Extracting ODBC Artifacts

Expand Down
4 changes: 2 additions & 2 deletions docs/api/python/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ con.sql("SELECT 42 AS x").show()

### Persistent Storage

The `duckdb.connect(`*`dbname`*`)` creates a connection to a **persistent** database.
Any data written to that connection will be persisted, and can be reloaded by re-connecting to the same file, both from Python and from other DuckDB clients.
The `duckdb.connect(dbname)` creates a connection to a **persistent** database.
Any data written to that connection will be persisted, and can be reloaded by reconnecting to the same file, both from Python and from other DuckDB clients.

```python
import duckdb
Expand Down
4 changes: 2 additions & 2 deletions docs/data/parquet/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Parquet files are compressed columnar files that are efficient to load and proce

| Function | Description | Example |
|:--|:--|:-----|
| `read_parquet(`*`path(s)`*`, *)` | Read Parquet file(s) | `SELECT * FROM read_parquet('test.parquet');` |
| `parquet_scan(`*`path(s)`*`, *)` | Alias for `read_parquet` | `SELECT * FROM parquet_scan('test.parquet');` |
| `read_parquet(path_or_list_of_paths)` | Read Parquet file(s) | `SELECT * FROM read_parquet('test.parquet');` |
| `parquet_scan(path_or_list_of_paths)` | Alias for `read_parquet` | `SELECT * FROM parquet_scan('test.parquet');` |

If your file ends in `.parquet`, the function syntax is optional. The system will automatically infer that you are reading a Parquet file.

Expand Down
6 changes: 3 additions & 3 deletions docs/extensions/autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ For the behavior of the `autocomplete` extension, see the [documentation of the

<div class="narrow_table"></div>

| Function | Description |
|:----------------------------------------|:-------------------------------------------------------|
| `sql_auto_complete(`*`query_string`*`)` | Attempts autocompletion on the given *`query_string`*. |
| Function | Description |
|:----------------------------------|:-----------------------------------------------------|
| `sql_auto_complete(query_string)` | Attempts autocompletion on the given `query_string`. |

## Example

Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/excel.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ SELECT excel_text(1234567.897, 'h:mm AM/PM') AS timestamp;

| Function | Description | Example | Result |
|:--|:---|:--|:-|
| `excel_text(`*`number`*`, `*`format_string`*`)` | Alias for `text`. | `excel_text(1234567.897, 'h:mm AM/PM')` | `9:31 PM` |
| `text(`*`number`*`, `*`format_string`*`)` | Format the given `number` per the rules given in the `format_string` | `text(1234567.897, 'h AM/PM')` | `9 PM` |
| `excel_text(number, format_string)` | Alias for `text`. | `excel_text(1234567.897, 'h:mm AM/PM')` | `9:31 PM` |
| `text(number, format_string)` | Format the given `number` per the rules given in the `format_string` | `text(1234567.897, 'h AM/PM')` | `9 PM` |

## GitHub

Expand Down
Loading

0 comments on commit d83cda9

Please sign in to comment.