Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to convert SpatialObj fields to Blobs

tom-intalytics
5 - Atom

.  I am updating a macro to convert SpatialObj fields to Blobs.  These are my parameters:
 

  • The data stream may or may not contain a SpatialObj field.  If it does not, the data should be passed through.  If it does, the SpatailObj field must be converted to Blob (no other data types).
  • The SpatialObj field may be either a Point or a Polygon.
  • The name of the SpatialObj field(s) is unknown.  It will probably change with every run.
  • The field name(s) must be maintained.
  • Each record in the data stream will contain other fields.  The names of these fields are also unknown, and will probably change with every run.
  • The number of fields in the data stream is not set, and will probably change with every run.
  • The number of records in the data stream is not set, and will probably change with every run.

 

The problem I am running into is that the Dynamic tools do not support Blobs, and the Blob Convert tool is not dynamic.

2 REPLIES 2
BrandonB
Alteryx
Alteryx

If you are trying to isolate spatial object fields specifically, I would encourage you to use two Dynamic Select tools to branch your workflow in separate directions with a record ID after each. That way in one you could choose all fields that don't include spatial objects and in the other you could choose only columns with spatial objects. You can perform the necessary transformations to just the spatial objects in its own stream and then join back up on the RecordID field to the other data set: 

 

BrandonB_0-1633109210370.png

 

danilang
19 - Altair
19 - Altair

Hi @tom-intalytics 

 

Your situation sounds rather complex.  @BrandonB has a good start with isolating the spatial object field.  You're then left with the problem of Blob Convert issue which needs static field name.  One way to handle this is to use the field info tool on the spatial field to find its name.  Use a Dynamic Rename to set it to a known name "_SPATIAL_FIELD_" and then pass this to the Blob Convert which is configured to convert "_SPATIAL_FIELD_".  Take the output and rename it to the original name using a second Dynamic Rename.  

 

Dan

Labels
Top Solution Authors