Solved

How can i store _Packed attribute by AttributejSonPacker?

  • 20 September 2017
  • 5 replies
  • 1 view

Badge

Hi,

How can i store _packed attributes which is having multiple attributes packed by AttributejSonPacker?

Can i store that _packed attribute as BLOB type attribute in File Geodatabase?

Thanks in advance.

icon

Best answer by david_r 21 September 2017, 09:17

View original

5 replies

Userlevel 4

Since JSON is text, the easiest is just to store it in a text attribute.

You can store a maximum of 2,147,483,647 characters in a text attribute in a File Geodatabase, which I guess should be more than enough.

Badge

Since JSON is text, the easiest is just to store it in a text attribute.

You can store a maximum of 2,147,483,647 characters in a text attribute in a File Geodatabase, which I guess should be more than enough.

Ok, and second part is i want to read that packed attributes in another workbench using AttributeJsonUnpacker followd by Filegeodatabase Reader.

 

How can i unpacked those attributes and use that as attr1, attr2, attr3 packed in _packed?

 

 

Badge

Since JSON is text, the easiest is just to store it in a text attribute.

You can store a maximum of 2,147,483,647 characters in a text attribute in a File Geodatabase, which I guess should be more than enough.

Getting the following error while storing it as text.

 

 

Python Exception <ValueError>: end is out of bounds
Error encountered while calling function `unpackAttributes'
f_21(PythonFactory): PythonFactory failed to process feature

 

 

Userlevel 4
Getting the following error while storing it as text.

 

 

Python Exception <ValueError>: end is out of bounds
Error encountered while calling function `unpackAttributes'
f_21(PythonFactory): PythonFactory failed to process feature

 

 

That looks more like a Python error than a writer error. What are the values of attr1, attr2 and attr3?
Userlevel 4

Here's a small workspace that demonstrates reading and writing JSON-packed attributes to a text attribute in a file geodatabase.

Disable either one of the bookmarks to test either reading or writing to the fgdb (don't leave both enabled).

attributejsonpacker.fmwt

Reply