View Source Glific.BigQuery (Glific v5.1.6)

Glific BigQuery Dataset and table creation

Link to this section Summary

Functions

Alter bigquery table schema, if required this function should be called from iex

Refresh the bigquery schema and update all the older versions.

Format dates for the bigquery.

Format all the json values

Ignore the tables for updates operations

Returns the status if the bigquery is enabled for organization.

Creating a dataset with messages and contacts as tables

Link to this section Functions

Link to this function

alter_tables(conn, organization_id, dataset_id, project_id)

View Source
@spec alter_tables(Tesla.Client.t(), non_neg_integer(), String.t(), String.t()) :: :ok

Alter bigquery table schema, if required this function should be called from iex

Link to this function

decode_bigquery_credential(credentials, org_contact, organization_id)

View Source
@spec decode_bigquery_credential(map(), map(), non_neg_integer()) ::
  {:ok, any()} | {:error, any()}

Decoding the credential for bigquery

Link to this function

do_refresh_the_schema(organization_id, cred)

View Source
@spec do_refresh_the_schema(non_neg_integer(), map()) ::
  {:error, Tesla.Env.t()} | {:ok, Tesla.Env.t()}

Refresh the bigquery schema and update all the older versions.

Link to this function

format_date(date, organization_id)

View Source
@spec format_date(DateTime.t() | nil, non_neg_integer()) :: String.t()

Format dates for the bigquery.

@spec format_json(map() | nil) :: iodata()

Format all the json values

Link to this function

ignore_updates_for_table()

View Source
@spec ignore_updates_for_table() :: list()

Ignore the tables for updates operations

@spec is_active?(non_neg_integer()) :: boolean()

Returns the status if the bigquery is enabled for organization.

Link to this function

make_insert_query(data, table, organization_id, attrs)

View Source
@spec make_insert_query(map() | list(), String.t(), non_neg_integer(), Keyword.t()) ::
  :ok

Insert rows in the bigquery

Link to this function

make_job_to_remove_duplicate(table, organization_id)

View Source
@spec make_job_to_remove_duplicate(String.t(), non_neg_integer()) :: :ok

Merge delta and main tables.

Link to this function

sync_schema_with_bigquery(organization_id)

View Source
@spec sync_schema_with_bigquery(non_neg_integer()) :: {:ok, any()} | {:error, any()}

Creating a dataset with messages and contacts as tables