1
votes

1: I tried to load on an existing table [using Datastore file]
2. Bq Shell asked me to add write_disposition to write append to load to existing table
3. If I do the above, throws an error as follows:

load --source_format=DATASTORE_BACKUP --write_disposition=WRITE_append --allow_jagged_rows=None sample_red.t1estchallenge_1 gs://test.appspot.com/bucket/ahFzfnZpcmdpbi1yZWQtdGVzdHJBCxIcX0FFX0RhdGFzdG9yZUFkbWluX09wZXJhdGlvbhiBwLgCDAsSFl9BRV9CYWNrdXBfSW5mb3JtYXRpb24YAQw.entity.backup_info

Error parsing command: flag --allow_jagged_rows=None: ('Non-boolean argument to boolean flag',None)

I tried allow jagged rows = 0 and allow jagged rows = None, nothing works just the same error. Please advise on this. UPDATE: As Mosha suggested --allow_jagged_rows=false has worked. It should be before --write_disposition=Write_truncate. But this has led to another issue on encoding. Can anyone say what should be the encoding type for DATASTORE_BACKUP?. I tried both --encoding=UTF-8 and --encoding=ISO-8859.

load --source_format=DATASTORE_BACKUP --allow_jagged_rows=false --write_disposition=WRITE_TRUNCATE sample_red.t1estchallenge_1 gs://test.appspot.com/STAGING/ahFzfnZpcmdpbi1yZWQtdGVzdHJBCxIcX0FFX0RhdGFzdG9yZUFkbWluX09wZXJhdGlvbhiBwLgCDAsSFl9BRV9CYWNrdXBfSW5mb3JtYXRpb24YAQw.entityname.backup_info

Please advise.

1
you assign boolean values with "none" now? - Patrice
@Patrice I just tried all options like 0 0r None and finally false as value has helped me. But It has turned to new issue now - ie, encoding type it couldn't take UTF-8 [csv] or ISO-8859. int() argument must be a string or a number, not 'Nonetype' - is the error - user4033385
What do you mean "all options"?... bools are true/false... anyway. Your edit is actually a new question, you should keep each question encapsulated in its own post. Stack differs from traditional forums in that :). - Patrice
And if mosha's answer helped you, normally you should upvote/accept (the arrow pointing up next to his answer and/or the checkmark). Read the tour, it'll be helpful :) - Patrice
Why aren't you accepting mosha's answer and making a new question? This is terrible stack overflow etiquette :\ - DT Rush

1 Answers

2
votes

You should use "false" (or "true") with boolean arguments, i.e.

--allow_jagged_rows=false