Skip to content

BigQuery: Not able to create a simple(non-partitioned) table #140

@puneetpahuja

Description

@puneetpahuja
 let tableToCreate =
          -- tabTimePartitioning .~ Just (tpField .~ Just "at" $
          --                              timePartitioning) $
          tabLocation .~ Just bigQueryTableLocation $
          tabTableReference .~ Just  (trDataSetId .~ Just dataSetId $
                                      trProjectId .~ Just projectId $
                                      trTableId .~ Just tableId $
                                      tableReference) $
          tabSchema .~ (schemaTable ^. tabSchema) $
          table

If I try to create the above table using tablesInsert, I get an exception:

*** Exception: ServiceError (ServiceError' {_serviceId = ServiceId "bigquery:v2", _serviceStatus = 
Status {statusCode = 400, statusMessage = "Bad Request"}, _serviceHeaders = [("Vary","Origin"),
("Vary","X-Origin"),("Vary","Referer"),("Content-Type","application/json; charset=UTF-8"),
("Content-Encoding","gzip"),("Date","Mon, 16 Sep 2019 12:55:47 GMT"),("Server","ESF"),("Cache-Control","private"),
("X-XSS-Protection","0"),("X-Frame-Options","SAMEORIGIN"),("X-Content-Type-Options","nosniff"),
("Alt-Svc","quic=\":443\"; ma=2592000; v=\"46,43,39\""),("Transfer-Encoding","chunked")], 
_serviceBody = Just "{\n  \"error\": {\n    \"code\": 400,\n    
\"message\":\"Either interval partition or range partition should be specified.\",\n    
\"errors\": [\n      {\n        \"message\": \"Either interval partition or range partition should be specified.\",\n         
\"domain\": \"global\",\n        \"reason\": \"invalid\"\n      }\n    ],\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n"})

But if I provide the tabTimePartitioning (commented out in code), it works fine and creates a partitioned table.

Version: gogol-bigquery-0.4.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions