Skip to main content
Question

Writing Portal for ArcGIS (or AGOL) image attachments to SDE - relationship class ok but image is not valid


annette2
Contributor
Forum|alt.badge.img+10

Hi,

I am copying a Portal hosted feature service to our internal Oracle SDE database.

The relationship class is written ok and I can see that the correct attachment is associated with the parent table. However the image is not valid when I try to open it via ArcGIS Pro or ArcMap.

I've read a lot of forum posts including this one but I still haven't got it working. Does anyone have an example with the last steps on how to get the downloaded attachment (binary data) into a SDE jpeg attachment that I could take a look at?

Or outline the order of the transformers Binarydecoder, rasterreplacer (I see the raster in inspector, only if I use the decoder first), AttributeFileWriter (you write the file to a disk but not the database - do you use the AttributeFileReader to read it again and write to an attribute in the attachment table?)

 

Any ideas would be appreciated.

 

Thanks in advance,

Annette

 

 

7 replies

annette2
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • March 28, 2019

Got it working. I will post the workspace later so that others can reference it.

We want to take a copy of Survey123 records and attachments to our internal SDE schema (and to be able to see the photos because the Inbox doesn't support attachments).

BinaryDecoder > RasterReplacer> AttributeFileWriter > AttributeFileReader was the sequence I used. Perhaps there is a more elegant solution but this worked.

This screenshot is the part used to write the photo to the database.


bruceharold
Contributor
Forum|alt.badge.img+17
  • Contributor
  • March 28, 2019
annette2 wrote:

Got it working. I will post the workspace later so that others can reference it.

We want to take a copy of Survey123 records and attachments to our internal SDE schema (and to be able to see the photos because the Inbox doesn't support attachments).

BinaryDecoder > RasterReplacer> AttributeFileWriter > AttributeFileReader was the sequence I used. Perhaps there is a more elegant solution but this worked.

This screenshot is the part used to write the photo to the database.

Good example, on a related topic I avoided writing directly to attachments like this:

https://community.esri.com/community/open-platform-standards-and-interoperability/blog/2019/03/21/using-arcgis-pros-python-environment-in-etl-tools

 


  • July 2, 2019
annette2 wrote:

Got it working. I will post the workspace later so that others can reference it.

We want to take a copy of Survey123 records and attachments to our internal SDE schema (and to be able to see the photos because the Inbox doesn't support attachments).

BinaryDecoder > RasterReplacer> AttributeFileWriter > AttributeFileReader was the sequence I used. Perhaps there is a more elegant solution but this worked.

This screenshot is the part used to write the photo to the database.

HI @annette2, Can you please share updated workspace.


annette2
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • July 3, 2019
psr14789 wrote:

HI @annette2, Can you please share updated workspace.

Hi @psr14789,

See the attachment. I've modified the Portal for ArcGIS URL and sde connections.

 

KB Inspecties naar Oracle prod.fmw


psr14789 wrote:

HI @annette2, Can you please share updated workspace.

Hi Annette-

 

Is this workspace still available?


psr14789 wrote:

HI @annette2, Can you please share updated workspace.

@annette2​ 


Forum|alt.badge.img+2
psr14789 wrote:

HI @annette2, Can you please share updated workspace.

Hi @codyrbarrett​ ,

 

Sorry it appears this link was broken during the Community migration, I have updated the answer so the download link is now available. If you encounter any issues such as this around the Community please submit feedback here or tag a Safer such as myself (<name>atsafe) and we'll be able to get this fixed for you.


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