View Source SnowflakeEx.HTTPClient (snowflake_elixir v0.2.0)

Helper library for interacting with Snowflakes REST API. This should not be called directly, use the SnowflakeEx.SnowflakeConnectionServer module instead, as it will use a GenServer.

Link to this section Summary

Link to this section Functions

Link to this function

decode_column(arg1, value)

View Source
Link to this function

get_query_by_id(host, token, query_id)

View Source
Link to this function

insert(host, token, query, params, connect_opts)

View Source
Link to this function

is_query_complete(host, token, query_id)

View Source
Link to this function

login(host, account_name, warehouse, database, schema, username, password, role, snowflake_options)

View Source
@spec login(
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  []
) :: {:ok, %{token: String.t(), session_id: String.t()}} | {:error, String.t()}

Logs into Snowflake, returning a token and Session ID. The token can be used for querying in future.

Link to this function

query(host, token, query, opts)

View Source
@spec query(String.t(), String.t(), String.t(), Keyword.t()) :: %SnowflakeEx.Result{
  columns: term(),
  messages: term(),
  metadata: term(),
  num_rows: term(),
  rows: term(),
  statement: term(),
  success: term()
}

Runs a query from a string, then returns the result in a %SnowflakeEx.Result{} struct.

Link to this function

query_info(host, token, query_id)

View Source