Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.bigquery.getTables
Explore with Pulumi AI
Get a list of tables in a BigQuery dataset. For more information see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const tables = gcp.bigquery.getTables({
    datasetId: "my-bq-dataset",
    project: "my-project",
});
import pulumi
import pulumi_gcp as gcp
tables = gcp.bigquery.get_tables(dataset_id="my-bq-dataset",
    project="my-project")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/bigquery"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := bigquery.GetTables(ctx, &bigquery.GetTablesArgs{
			DatasetId: "my-bq-dataset",
			Project:   pulumi.StringRef("my-project"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var tables = Gcp.BigQuery.GetTables.Invoke(new()
    {
        DatasetId = "my-bq-dataset",
        Project = "my-project",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigquery.BigqueryFunctions;
import com.pulumi.gcp.bigquery.inputs.GetTablesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var tables = BigqueryFunctions.getTables(GetTablesArgs.builder()
            .datasetId("my-bq-dataset")
            .project("my-project")
            .build());
    }
}
variables:
  tables:
    fn::invoke:
      function: gcp:bigquery:getTables
      arguments:
        datasetId: my-bq-dataset
        project: my-project
Using getTables
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTables(args: GetTablesArgs, opts?: InvokeOptions): Promise<GetTablesResult>
function getTablesOutput(args: GetTablesOutputArgs, opts?: InvokeOptions): Output<GetTablesResult>def get_tables(dataset_id: Optional[str] = None,
               project: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetTablesResult
def get_tables_output(dataset_id: Optional[pulumi.Input[str]] = None,
               project: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetTablesResult]func GetTables(ctx *Context, args *GetTablesArgs, opts ...InvokeOption) (*GetTablesResult, error)
func GetTablesOutput(ctx *Context, args *GetTablesOutputArgs, opts ...InvokeOption) GetTablesResultOutput> Note: This function is named GetTables in the Go SDK.
public static class GetTables 
{
    public static Task<GetTablesResult> InvokeAsync(GetTablesArgs args, InvokeOptions? opts = null)
    public static Output<GetTablesResult> Invoke(GetTablesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTablesResult> getTables(GetTablesArgs args, InvokeOptions options)
public static Output<GetTablesResult> getTables(GetTablesArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:bigquery/getTables:getTables
  arguments:
    # arguments dictionaryThe following arguments are supported:
- dataset_id str
- The dataset ID.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
getTables Result
The following output properties are available:
- DatasetId string
- Id string
- The provider-assigned unique ID for this managed resource.
- Tables
List<GetTables Table> 
- A list of all retrieved BigQuery tables. Structure is defined below.
- Project string
- DatasetId string
- Id string
- The provider-assigned unique ID for this managed resource.
- Tables
[]GetTables Table 
- A list of all retrieved BigQuery tables. Structure is defined below.
- Project string
- datasetId String
- id String
- The provider-assigned unique ID for this managed resource.
- tables
List<GetTables Table> 
- A list of all retrieved BigQuery tables. Structure is defined below.
- project String
- datasetId string
- id string
- The provider-assigned unique ID for this managed resource.
- tables
GetTables Table[] 
- A list of all retrieved BigQuery tables. Structure is defined below.
- project string
- dataset_id str
- id str
- The provider-assigned unique ID for this managed resource.
- tables
Sequence[GetTables Table] 
- A list of all retrieved BigQuery tables. Structure is defined below.
- project str
- datasetId String
- id String
- The provider-assigned unique ID for this managed resource.
- tables List<Property Map>
- A list of all retrieved BigQuery tables. Structure is defined below.
- project String
Supporting Types
GetTablesTable  
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.