Skip to main content
Solved

How can i store _Packed attribute by AttributejSonPacker?

  • September 20, 2017
  • 5 replies
  • 5 views

Forum|alt.badge.img

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.

Best answer by david_r

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

View original
Did this help you find an answer to your question?

5 replies

david_r
Celebrity
  • September 20, 2017

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.


Forum|alt.badge.img
  • Author
  • September 20, 2017
david_r wrote:

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?

 

 


Forum|alt.badge.img
  • Author
  • September 20, 2017
david_r wrote:

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

 

 


david_r
Celebrity
  • September 21, 2017
dheeraj wrote:
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?

david_r
Celebrity
  • Best Answer
  • September 21, 2017

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings