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

vdk-oracle: infer case-insesitive keys from columns when ingesting payloads #3219

Open
DeltaMichael opened this issue Mar 18, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request initiative: VDK Oracle VDK Oracle support story Task for an Epic
Milestone

Comments

@DeltaMichael
Copy link
Contributor

DeltaMichael commented Mar 18, 2024

Follow-up from #3194

Overview

The implementation in #3194 fetches all the column names and looks for them in the payload keys. The problem is that Oracle is case-insensitive by default and returns column names capitalized. We end up having to call lower() on the returned column names, which is not ideal.

For example, we could have a payload like

    payload = {
        "iD": "5",
        "Str_Data": "string",
        "INT_data": 12,
    }

But the columns we'd get when querying would be

ID,
STR_DATA,
INT_DATA

So we have to find a way to match between the two. Worse even, we could have something like this

    payload = {
        "iD": "5",
        "int_DATA": 11,
        "INT_data": 12,
    }

These should technically be two different columns.

One possible solution is to make all column names case-sensitive, by putting them in quotes. We already do this to escape special characters and we can extend it to all column names. This should be covered by functional tests.

Acceptance criteria

  1. Support the above scenario
  2. Functional tests added for above scenario
@DeltaMichael DeltaMichael added enhancement New feature or request initiative: VDK Oracle VDK Oracle support labels Mar 18, 2024
@DeltaMichael DeltaMichael added this to the VDK Oracle milestone Mar 18, 2024
@DeltaMichael
Copy link
Contributor Author

Quick fix: Throw error when you get a non-lowercase key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request initiative: VDK Oracle VDK Oracle support story Task for an Epic
Projects
None yet
Development

No branches or pull requests

1 participant