System.ArgumentException: 'Value BIGNUMERIC is undefined in BigQueryDbType

Viewed 131

in GCP BigQuery id is BIGNUMERIC data,ora is string.

if not use id all work fine.

CODE: using Google.Apis.Auth.OAuth2; using Google.Cloud.BigQuery.V2;

        var jsonPath = "acount.json";
        var projectId = "Projectname";
        var credentials = GoogleCredential.FromFile(jsonPath);
        var client = BigQueryClient.Create(projectId, credentials);


        string query = @"
        SELECT *
        FROM `Temp.test`
        LIMIT 100";
        BigQueryJob job = client.CreateQueryJob(
            sql: query,
            parameters: null,
            options: new QueryOptions { UseQueryCache = false });
        // Wait for the job to complete.
        job = job.PollUntilCompleted().ThrowOnAnyError();
        // Display the results



        foreach (BigQueryRow row in client.GetQueryResults(job.Reference))
        {

            richTextBox1.Text += row["id"] + " | " + row["storeno"] + " | " + row["data"] +"\n";
        }

receive this error :

System.ArgumentException: 'Value BIGNUMERIC is undefined in BigQueryDbType Parameter name: name'

2 Answers

This is the error returned when the version of the Google.Cloud.BigQuery.V2 package doesn't support the data type being used.

The BIGNUMERIC type support was implemented just recently. It's not currently in a stable package, but I would urge you to test version 2.4.0-beta01 which includes support.

We hope to release a stable version (which will be 2.4.0) fairly soon. (Please file any issues you encounter in our GitHub repo - hopefully it'll just work for you though.)

Like what was mentioned before you can update to version 2.4.0-beta01. If you cant update or don't want to update, for the BIGNUMERIC value instead of using row["Name"] you can use row.RawRow.F[ColNumber].V

Related