dbcli / dbcli/athenacli

Example requested: how to escape `where`

Open
#80 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
228
Forks
36
PR merge metrics
No merged PRs in 30d

Description

I'd like to be able to execute the following query with `-e`, without writing a `sql` file. What's the best way to do this? Because I need both `"` and `'` I'm unsure how to escape in the context of `-e 'my query string here'`.

```
select *
from "AwsDataCatalog"."database"."table"
where "column" = 'value'
```

Naively executing this just returns a confusing error (it's mistaking my value for a column):

```
COLUMN_NOT_FOUND: line 1:190: Column 'value' cannot be resolved or requester is not authorized to access requested resources
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.