blanton v0.1.5 Blanton.Table
Handles BigQuery table schema.
Link to this section Summary
Functions
create new table
create new table
Create new table
delete specific Table
Get table structs
Get table lists using config.exs
Get table lists
create new GoogleApi.BigQuery.V2.Model.Table
create new table struct
Get table schema
Update table schema
Update table schema
Link to this section Functions
create(table)
Specs
create(Table.t()) :: GoogleApi.BigQuery.V2.Model.Table.t()
create new table
example
create(table)
%GoogleApi.BigQuery.V2.Model.Table{}
create(table_name, columns)
Specs
create(String.t(), list()) :: GoogleApi.BigQuery.V2.Model.Table.t()
create new table
example
create( "table_name", [
%{name: "column", type: :string, mode: :required},
] ) :: GoogleApi.BigQuery.V2.Model.Table.t()
%GoogleApi.BigQuery.V2.Model.Table{}
create(project_id, dataset_id, table)
Specs
create(String.t(), String.t(), Table.t()) :: GoogleApi.BigQuery.V2.Model.Table.t()
Create new table
example
create("PROJECT_ID", "DATASET_ID", table)
%GoogleApi.BigQuery.V2.Model.Table{}
delete(project_id, dataset_id, table_name)
Specs
delete(String.t(), String.t(), String.t()) :: Tesla.Env.t()
delete specific Table
example
delete("PROJECT_ID", "DATASET_ID", "TABLE")
Tesla.Env.t()
get(table_id)
Specs
get(String.t()) :: GoogleApi.BigQuery.V2.Model.Table.t()
get(project_id, dataset_id, table_id)
Specs
get(String.t(), String.t(), String.t()) :: GoogleApi.BigQuery.V2.Model.Table.t()
Get table structs
example
get("PROJECT_ID", "DATASET_ID", "TABLE_ID")
%GoogleApi.BigQuery.V2.Model.Table{}
lists()
Specs
lists() :: [String.t()]
Get table lists using config.exs
example
lists()
["table_a", "table_b"]
lists(project_id, dataset_id)
Specs
Get table lists
example
lists("PROJECT_ID", "DATASET_ID")
["table_a", "table_b"]
new(name, columns)
Specs
new(String.t(), list()) :: GoogleApi.BigQuery.V2.Model.Table.t()
create new GoogleApi.BigQuery.V2.Model.Table
example
iex(1)> Blanton.Table.new("TABLE_NAME", [%{name: "column", type: :string, mode: :required}]) %GoogleApi.BigQuery.V2.Model.Table{ clustering: nil, creationTime: nil, description: nil, encryptionConfiguration: nil, etag: nil, expirationTime: nil, externalDataConfiguration: nil, friendlyName: nil, id: nil, kind: nil, labels: nil, lastModifiedTime: nil, location: nil, materializedView: nil, model: nil, numBytes: nil, numLongTermBytes: nil, numPhysicalBytes: nil, numRows: nil, rangePartitioning: nil, requirePartitionFilter: nil, schema: %GoogleApi.BigQuery.V2.Model.TableSchema{
fields: [%GoogleApi.BigQuery.V2.Model.TableFieldSchema{mode: "REQUIRED", name: "column", type: "STRING"}]
}, selfLink: nil, snapshotDefinition: nil, streamingBuffer: nil, tableReference: %GoogleApi.BigQuery.V2.Model.TableReference{
datasetId: "",
projectId: "",
tableId: "TABLE_NAME"
}, timePartitioning: nil, type: nil, view: nil }
new(name, columns, opts)
Specs
new(String.t(), list(), Keyword.t()) :: GoogleApi.BigQuery.V2.Model.Table.t()
new(project_id, dataset_id, name, columns)
Specs
new(String.t(), String.t(), String.t(), list()) :: GoogleApi.BigQuery.V2.Model.Table.t()
create new table struct
example
iex(1)> Blanton.Table.new("PROJECT_ID", "DATASET_ID", "TABLE_NAME", [%{name: "column", type: :string, mode: :required}]) %GoogleApi.BigQuery.V2.Model.Table{ clustering: nil, creationTime: nil, description: nil, encryptionConfiguration: nil, etag: nil, expirationTime: nil, externalDataConfiguration: nil, friendlyName: nil, id: nil, kind: nil, labels: nil, lastModifiedTime: nil, location: nil, materializedView: nil, model: nil, numBytes: nil, numLongTermBytes: nil, numPhysicalBytes: nil, numRows: nil, rangePartitioning: nil, requirePartitionFilter: nil, schema: %GoogleApi.BigQuery.V2.Model.TableSchema{
fields: [%GoogleApi.BigQuery.V2.Model.TableFieldSchema{mode: "REQUIRED", name: "column", type: "STRING"}]
}, selfLink: nil, snapshotDefinition: nil, streamingBuffer: nil, tableReference: %GoogleApi.BigQuery.V2.Model.TableReference{
datasetId: "DATASET_ID",
projectId: "PROJECT_ID",
tableId: "TABLE_NAME"
}, timePartitioning: nil, type: nil, view: nil }
schema(table_id)
Specs
schema(String.t()) :: [GoogleApi.BigQuery.V2.Model.TableFieldSchema.t()]
schema(project_id, dataset_id, table_id)
Specs
schema(String.t(), String.t(), String.t()) :: [ GoogleApi.BigQuery.V2.Model.TableFieldSchema.t() ]
Get table schema
example
schema("PROJECT_ID", "DATASET_ID", "TABLE_ID")
[%GoogleApi.BigQuery.V2.Model.TableFieldSchema{}]
update(table_id, table)
Specs
update(String.t(), Table.t()) :: GoogleApi.BigQuery.V2.Model.TableRefence.t()
Update table schema
update("TABLE_NAME", Table.new())
update(project_id, dataset_id, table_id, table)
Specs
update(String.t(), String.t(), String.t(), Table.t()) :: GoogleApi.BigQuery.V2.Model.TableRefence.t()
Update table schema
update("PROJECT_ID", "DATASET_ID", "TABLE_NAME", Table.new())