Skip to content

[BigQuery] There are no column descriptions provided for table #3425

Closed

Description

@martinstuder

When trying to import a CSV file into BigQuery from GCS using

LoadJobConfiguration.builder(table, path)
      .setAutodetect(true)
      .setIgnoreUnknownValues(false)
      .setMaxBadRecords(0)
      .setFormatOptions(FormatOptions.csv())
      .setCreateDisposition(CreateDisposition.CREATE_IF_NEEDED)
      .setWriteDisposition(WriteDisposition.WRITE_TRUNCATE)
      .build()

I get the error "There are no column descriptions provided for table [table_name]". Loading the same file via the BigQuery web UI using the same options works fine. The CSV file is available at https://storage.googleapis.com/miraisolutions/public/macbeth.csv

Activity

  1. added
    type: questionRequest for information or clarification. Not an issue.
    api: bigqueryIssues related to the BigQuery API.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Jul 3, 2018
  2. JesseLovelace commented on Dec 13, 2018

    @JesseLovelace
    Contributor

    Hi,

    I'm not able to reproduce this. I ran the following:

    String tableName = "macbethtable";
    TableId destinationTable = TableId.of("macbeth", tableName);
    LoadJobConfiguration configuration =
        LoadJobConfiguration.newBuilder(destinationTable, "https://storage.googleapis.com/miraisolutions/public/macbeth.csv")
                .setAutodetect(true)
                .setIgnoreUnknownValues(false)
                .setMaxBadRecords(0)
                .setFormatOptions(FormatOptions.csv())
                .setCreateDisposition(JobInfo.CreateDisposition.CREATE_IF_NEEDED)
                .setWriteDisposition(JobInfo.WriteDisposition.WRITE_TRUNCATE)
                .build();
    Job remoteLoadJob = bigquery.create(JobInfo.of(configuration));
    remoteLoadJob = remoteLoadJob.waitFor();

    This ran successfully, and I verified in the console that the resulting table is the same as when I upload the CSV using the web UI.

    Are you still experiencing this issue? If so, can you show us some more of your code? I suspect maybe some other part of your configuration is causing it

  3. JesseLovelace commented on Jan 2, 2019

    @JesseLovelace
    Contributor

    Closing due to being unable to reproduce and inactivity on the issue, feel free to reopen if you're still experiencing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨 criticalP0 critical issue. Requires immediate fixapi: bigqueryIssues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions