Question

Creating attributes as Values for a new attribute


Badge
Hi there!

 

 

I'm a bit stuck with something that couldn't possible as hard as I'm finding it to be..

 

 

I have a folder with a bunch of shapefiles in, and I simply want an xls output (fanned out by fme_basename) with an attribute that lists all the attributes in each shapefiles.

 

 

So in other words, my workspace creates a tab for each shapfeile, but I can't figure out how to just list all the attributes present. I simply want to know which attributes are present. Here's an example of what I'd like:

 

 

"ROADS": (imagine this is one of the xls tabs)

 

 

"Present Attributes" (This is the field/attribute I create for each tab)

 

"user"

 

"date"

 

"direction"

 

"type"

 

etc etc..

 

 

I hope this explination makes at least some level of sense.

 

 

 

Thanks in advance,

5 replies

Userlevel 4
Hi,

 

 

have a look at the "Schema (any format)" reader.

 

 

Also look at the response from 1SpatialKaty to the question by user sbaktzg just below.

 

 

David

 

 

 

Badge
Hi David, 

 

I see no link or answer present from "1SpatialKaty" in your post.

 

 

Greetings,
Userlevel 4
Hi,

 

 

I was referring to a question posted earlier today. Here it is (https://safecommunity.force.com/CommunityAnswers?id=906a0000000d1LfAAI).

 

 

David
Userlevel 4
Well, yesterday, actually... :-)

 

 

Hope it helps.

 

 

David
Badge +3
it is also possible to use an attributeexploder for this.

 

You could use a advanced browser to read all shapes in the folder.

 

Then write a excelfile with just the _att_name attribute from the exploder.

 

Excelwriter  could be set to a attribute created linked to 'SourceDataset_SHAPE' parameter . (click little black arrow in attributecreator, select "Link to parameter")

 

Or like in articel above dst_file = FME_MacroValues['SourceDataset_SHAPE'] (wich is basicallly the same)

 

Reply