Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8812383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:35:38+00:00 2026-06-14T03:35:38+00:00

From the import documentation of BigQuery, Note: Null values are not allowed So I

  • 0

From the import documentation of BigQuery,

Note: Null values are not allowed

So I assume null is not allowed in a json-formatted data for BigQuery import. However, null value is actually very common in regular ETL task (due to missing data). What should be a good solution to import such json source files? Note my data contains nested structures so I do not prefer a conversion to CSV and use ,, to represent a null value.

One way I think I can do is to replace all null values with default values of different data types respectively, e.g.,

  • string: null -> empty string
  • integer: null -> -1
  • float: null -> -1.0
  • …

But I don’t like it. I am looking for better options.

BTW, I tried to do bq load with a json file containing null values. I get the below error:

Failure details:
- Expected '"' found 'n'
- Expected '"' found 'n'
- Expected '"' found 'n'
- Expected '"' found 'n'
- Expected '"' found 'n
...

I think this is the indication of null usage, is it correct?

EDIT: If I remove all the null fields, it seems to work. I guess this is the way to handle the null data. You cannot have null for a data field, but you can just not include it. So I need to have a filtering code to remove all the null field in my raw json.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:35:39+00:00Added an answer on June 14, 2026 at 3:35 am

    You can import NULL values using JSON format source files – omit the key:value pair for values that are NULL.

    Example – Let’s say you have a schema like this:

    {
    "name": "kind",
    "type": "string"
    },
    {
    "name": "fullName",
    "type": "string",
    },
    {
    "name": "age",
    "type": "integer",
    "mode": "nullable"
    }
    

    A record with no NULL values might look like this:

    {"kind": "person",
     "fullName": "Some Person",
     "age": 22
    }
    

    However, when “age” is NULL, try this (note, no “age” key):

    {"kind": "person",
     "fullName": "Some Person",
    }
    

    Please let us know if you have issues with this. I’ll make a note to improve the documentation around using NULL values with JSON import formats.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

import httplib2 from urllib import urlencode h = httplib2.Http() h.add_credentials('zackster@gmail.com', 'PassWord') data = dict(key=ThisIsMyApiKeyICopiedAndPastedIt)
The documentation is a bit lacking with respect to this feature. from django import
After changing the import as a from-import i'm running into this error: from datetime
i need to create a object Image from import javax.microedition.lcdui.Image; using a file .png
OK, so I know that from-import is exactly the same as import , except
from random import * while True: random1 = randint(1,20) random2 = randint(1,20) print(h =
from jinja2 import Template template = Template('Hello {{ name }}!') template.render(name='John Doe') I have
from operator import itemgetter from itertools import takewhile xs = [ ('foo',1), ('bar',1), ('baz',2)
from xlrd import * book = open_workbook(File_1.xls) #sheet = book.sheets()[0] #book.sheets() returns a list
from Tkinter import * app = Tk() text_field = Entry(app) text_field.pack() app.mainloop() I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.