bigquery_api_service
class bigquery_api_service
Properties
| static protected | $instance | Singleton instance of the class. |
|
| protected mixed | $client | Client instance for handling requests. |
Methods
Constructs an instance of the class and initializes the BigQuery client.
Provides a singleton instance of the class.
Retrieves a list of datasets based on the provided options.
Fetches the specified dataset.
Creates a new dataset with the specified identifier and options.
Retrieves the list of tables from the specified dataset.
Retrieves a specific table from a dataset in BigQuery.
Creates a table in a specified dataset in BigQuery.
Retrieves the BigQuery client instance.
Prepares a table in the specified dataset on BigQuery by ensuring the dataset and table exist, and updates the table structure if necessary.
Loads a dataset table with data from a specified file.
Retrieves information about datasets and their respective tables.
Executes a merge operation between two tables in BigQuery.
Updates the table structure based on the provided schema in the options.
Loads data into a BigQuery table.
Details
at line 52
__construct()
Constructs an instance of the class and initializes the BigQuery client.
Retrieves the configuration for Google BigQuery credentials, validates and processes the credentials, and initializes the BigQueryClient using the provided options. If the credentials are missing, invalid, or improperly formatted, an exception is thrown.
at line 84
static bigquery_api_service
instance()
Provides a singleton instance of the class.
at line 102
ItemIterator
get_datasets(array $options = [])
Retrieves a list of datasets based on the provided options.
at line 115
mixed
get_dataset(string $id, null|string $projectId = null)
Fetches the specified dataset.
at line 130
static Dataset
createDataset(string $id, array $options = [])
Creates a new dataset with the specified identifier and options.
at line 151
ItemIterator
get_tables(string $datasetid, array $options = [])
Retrieves the list of tables from the specified dataset.
at line 170
null|Table
get_table(string $datasetid, string $tableid)
Retrieves a specific table from a dataset in BigQuery.
at line 198
Table
createTable(string $datasetid, string $tableid, array $options = [])
Creates a table in a specified dataset in BigQuery.
at line 218
BigQueryClient
get_client()
Retrieves the BigQuery client instance.
at line 240
null|Table
prepare_table(string $datasetid, string $tableid, array $options)
Prepares a table in the specified dataset on BigQuery by ensuring the dataset and table exist, and updates the table structure if necessary.
at line 268
mixed
load(array $params)
Loads a dataset table with data from a specified file.
at line 291
array
test()
Retrieves information about datasets and their respective tables.
Each dataset includes details such as its ID and a list of associated tables. For each table, information such as ID, path, and creation time is provided.
at line 332
null|Job
merge(string $origintable, string $destinationtable, string $write_disposition = 'WRITE_TRUNCATE')
Executes a merge operation between two tables in BigQuery.
at line 354
protected bool
update_table_structure(Table $table, array $options)
Updates the table structure based on the provided schema in the options.
at line 403
protected Job
load_data(string $datasetid, string $tableid, resource|string $data, bool $has_header = false, string $format = 'CSV', string $write_disposition = 'WRITE_TRUNCATE')
Loads data into a BigQuery table.