Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot materialize job results when table does not yet exist #302

Open
ohaibbq opened this issue Apr 11, 2024 · 0 comments · May be fixed by #303
Open

Cannot materialize job results when table does not yet exist #302

ohaibbq opened this issue Apr 11, 2024 · 0 comments · May be fixed by #303
Labels
bug Something isn't working

Comments

@ohaibbq
Copy link
Contributor

ohaibbq commented Apr 11, 2024

What happened?

    server_test.go:515: googleapi: Error 400: failed to add table data: failed to analyze: INVALID_ARGUMENT: Table not found: `dataset1.table_a_materialized` [at 1:8], jobInternalError

What did you expect to happen?

Table to be created with data

How can we reproduce it (as minimally and precisely as possible)?

query := client.Query("SELECT id FROM dataset1.table_a")
	query.QueryConfig.Dst = &bigquery.Table{
		ProjectID: projectName,
		DatasetID: "dataset1",
		TableID:   "table_a_materialized",
	}
	it, err := query.Read(ctx)
	if err != nil {
		t.Fatal(err)
	}
	for {
		var row []bigquery.Value
		if err := it.Next(&row); err != nil {
			if err == iterator.Done {
				break
			}
			t.Fatal(err)
		}
		t.Log("row = ", row)
	}

	query = client.Query("SELECT id FROM dataset1.table_a_materialized")

	it, err = query.Read(ctx)
	if err != nil {
		t.Fatal(err)
	}

Anything else we need to know?

No response

@ohaibbq ohaibbq added the bug Something isn't working label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant