Common.Table (etl_core v0.1.54)

Module oriented to common functions for working with tables

Link to this section Summary

Functions

Obtains the values registered in Bigquery, associated with a set of record identifiers

Checks if the specified name matches any column

Link to this section Functions

Link to this function

get_stored_values_in_bigquery(pid, attr_list, ids, statement)

Obtains the values registered in Bigquery, associated with a set of record identifiers

parameters

Parameters:

- pid: Process. Process connecting Elixir and ODBC.

- attr_list: List of Tools.Struct.InfoAttr. Attributes to carry the query response to the defined data type.

- ids: List of Tools.Struct.InfoAttr. Attributes that will be used to differentiate the sets of records that share the same identifiers.

- statement: String. Statement to get the records from the database in Bigquery.

return

Return:

- Exception | Map, where the key contains the values of `keys` and the values are the data that Bigquery has associated with the record with that identifier
Link to this function

is_attr?(name, table)

Checks if the specified name matches any column

parameter

Parameter:

- table: Atom. Table name. It is assumed that this has implemented the function attr_list/0 -> List(Struct.InfoAttr)

- name: Atom | String. Name of the column to check.

return

Return:

- Boolean.