Skip to main content

Hi everybody,

I have a shapefile (line) and it includes fields:year, time, commune, province... and I have a .mdb that has a table empty have fields: a_xa, b_ti.

I want to get spatial data from shapefile to table in .mdb and get attribute (commune = a_xa, province = b_ti). How can I do?

Thank you

You can create a new workspace, add the shapefile as a reader and a writer for the mdb. When you create that writer you have the option to import the feature type (table) definition from an existing dataset, so do that. Connect the shapefile reader to an AttributeManager transformer to rename the attributes and then connect that to the MDB writer.


You can create a new workspace, add the shapefile as a reader and a writer for the mdb. When you create that writer you have the option to import the feature type (table) definition from an existing dataset, so do that. Connect the shapefile reader to an AttributeManager transformer to rename the attributes and then connect that to the MDB writer.

Thank you so much, redgeographics.

 

I want to ask some questions:

 

 

1. In the attributeManager, when I import the feature tye (from .mdb), the fields seem mixed sort. I want to keep the sort the same .mdb table.

 

 

2. In writer, I want to remove all field from shapefile, only keep in mdb fields. How to the way to move automatically?

 

 

Best regards,

 


You can edit the writer properties (the little cog wheel icon) and add or remove any attributes you like there.

As for the sorting, the AttributeManager should maintain the attribute order of the input data, can you post a screenshot?


You can edit the writer properties (the little cog wheel icon) and add or remove any attributes you like there.

As for the sorting, the AttributeManager should maintain the attribute order of the input data, can you post a screenshot?

- With question order .mdb sort different with AttributeManager Import. This is screenshot:

 


- With question order .mdb sort different with AttributeManager Import. This is screenshot:

 

I must admit I never use that import wizard for the AttributeManager. I don't think it matters much to be honest, in the end it's the order of the attributes on the writer that ends up in the target dataset.

 

 


I must admit I never use that import wizard for the AttributeManager. I don't think it matters much to be honest, in the end it's the order of the attributes on the writer that ends up in the target dataset.

 

 

But... the order in the AttributeManager does do something else. Actions there are processed in that order (top to bottom) so if you do stuff like deleting and renaming attributes keep an eye on that order.

 

 


I must admit I never use that import wizard for the AttributeManager. I don't think it matters much to be honest, in the end it's the order of the attributes on the writer that ends up in the target dataset.

 

 

Yes. I fix this problem. In the writer, only wirter "import from dataset". So no need focus to attributeManager 🙂. Thank you so much.

 

 

But I got a problem. My .mdb have attribute some field, but when I give it into AttributeManager, it has not attribute (empty). I think the problem is in AttributeManager when Import .mdb.

 

 

Could you tell me how to fix it to get attribute information?

 

 

 


Can you post your entire workspace? That would make it a bit easier to give some advice.


Can you post your entire workspace? That would make it a bit easier to give some advice.

Yes. This is my workspace.

 

join-geometry-fields-to-gdb.fmwt

 

 


Can you post your entire workspace? That would make it a bit easier to give some advice.

And this is my .mdb which I will Insert via AttributeManager

 

template-aspen.zip
And this is my .mdb which I will Insert via AttributeManager

 

template-aspen.zip
Aha, I thought you only wanted to copy the table structure, but it looks like what you really want is a join. That's much easier actually.

 

 

Instead of the AttributeManager you can use a DatabaseJoiner to match the MDB with the shapefile. It looks like the column NAME in the shapefile matches the bus_name in the MDB, so enter that. In Fields To Add you can pick which fields from the MDB you want to copy. That should do the trick.

 

 


And this is my .mdb which I will Insert via AttributeManager

 

template-aspen.zip

 

Actually, I want to copy table structure and join attribute (.mdb). May be, it will not match column (can be chose by manual).

 

 

I tried DatabaseJoiner, it's okie. I chose a field join, and add fields on a list attribute.

 

And I will connect some field with writer 🙂. Thank you so much :)

 

 

 


I have a question about connect fields.

For example: I have an excel file that description what is connected the same screenshot.

How to the way to connect fields automatically? Thank you


I have a question about connect fields.

For example: I have an excel file that description what is connected the same screenshot.

How to the way to connect fields automatically? Thank you

You can use a SchemaMapper, import that Excel file and use it for an Attribute Map.

 

There's some tutorials on the SchemaMapper here.

 

.

I have a question about connect fields.

For example: I have an excel file that description what is connected the same screenshot.

How to the way to connect fields automatically? Thank you

Thank you, I will see it 🙂

I have a question about connect fields.

For example: I have an excel file that description what is connected the same screenshot.

How to the way to connect fields automatically? Thank you

Dear redgeographics,

 

I tried the example attribute Mapping by SchemaMapper. I see that writer have attribute replace (red box). And I tried other writer, I can't get the same.

 

 

In my mind, the writer will make automatically from SchemaMapper, but my writer test can't.

 

Could you tell me why? Thank you

 


Dear redgeographics,

 

I tried the example attribute Mapping by SchemaMapper. I see that writer have attribute replace (red box). And I tried other writer, I can't get the same.

 

 

In my mind, the writer will make automatically from SchemaMapper, but my writer test can't.

 

Could you tell me why? Thank you

 

In the properties of the writer, on the User Attributes tab, you can set the attributes to dynamic. It will then automatically include all attributes of all datastreams coming in to it.

 

 

Alternatively, you can add, remove and rename attributes there.

 

 


Yes. It means, I have to add in User attributes tab by manual (hand). Can't add automatically?

 


Dear redgeographics,

 

I tried the example attribute Mapping by SchemaMapper. I see that writer have attribute replace (red box). And I tried other writer, I can't get the same.

 

 

In my mind, the writer will make automatically from SchemaMapper, but my writer test can't.

 

Could you tell me why? Thank you

 

Yes. It means, I have to add in User attributes tab by manual (hand). Can't add automatically?

 


Yes. It means, I have to add in User attributes tab by manual (hand). Can't add automatically?

 

You may have to add an AttributeExposer after the SchemaMapper and enter the new attribute names there, then the writer will pick that up if it's set to automatic. If you want more control (i.e. the proper datatypes) you should stick to manual and then add them there as well (or automatic at first so they get added, then switch to manual and edit if necessary)

 

 


Yes. It means, I have to add in User attributes tab by manual (hand). Can't add automatically?

 

I tried to add AttributeExposer after the SchemaMaper and make new attribute manual, it's oki. But I want to get attributes that replaces by column in excel automatically.

 

So I can't do it

 

 


Ah, I have a question like update field values.

I want to update values field from shapefile to .mdb table by automatically, no need change fieldname.

This is an example. I want to update all values from fields: Fromnode , ToNode to bus1_name and bus2_name, and I have excel description columns to connect together.

Could you tell me how to do it automatically? Thank you


Ah, I have a question like update field values.

I want to update values field from shapefile to .mdb table by automatically, no need change fieldname.

This is an example. I want to update all values from fields: Fromnode , ToNode to bus1_name and bus2_name, and I have excel description columns to connect together.

Could you tell me how to do it automatically? Thank you

It won't happen automatically I'm afraid. I think this might be a bug in the SchemaMapper (not exposing the new attributes and keeping the old ones even though I specified to remove them). I'll file a report with Safe.

 

 


It won't happen automatically I'm afraid. I think this might be a bug in the SchemaMapper (not exposing the new attributes and keeping the old ones even though I specified to remove them). I'll file a report with Safe.

 

 

Thank you. It's not exposing the new attributes. May be, cause is it version FME?

Reply