HGInsights / avalanche

Avalanche is an Elixir Snowflake Connector built on top of the Snowflake SQL API v2.
Apache License 2.0
17 stars 4 forks source link

Allow a `:downcase` option so the response has downcased keys #17

Closed pdgonzalez872 closed 1 year ago

pdgonzalez872 commented 1 year ago

Is your feature request related to a problem? Please describe. We get responses in this format:

  %{
    "SOME_KEY" => "00000",
    "ANOTHER_KEY" => 10185,
  }
  %{
    "some_key" => "00000",
    "another_key" => 10185,
  }

So folks using this library will likely need to hand write something like this:

data =
  Enum.map(rows, fn row ->
    Enum.into(row, %{}, fn {k, v} -> {String.downcase(k), v} end)
  end)

Describe the solution you'd like Allow an option to be passed down (downcase_keys) and we can call a function that does it to responses if key is present

Describe alternatives you've considered Not do anything, folks can deal with the result as they see fit

Additional context n/a

hgdeploy commented 1 year ago

:tada: This issue has been resolved in version 0.8.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: