Skip to main content
Solved

How to keep field properties in FGDB class?

  • December 30, 2019
  • 6 replies
  • 37 views

bobo
Contributor
Forum|alt.badge.img+3

I have several FGDBs with same feature class and fields and I want to merge them into one FGDB, so I set Single Merged Feature Type at reader and Dynamic at writer. By setting Feature Read Mode as Metadata I can keep field alias, but I can't keep allow null values as NO, is there way to make it work?

Figs below show that field properties before and after running workspaces.

Before:

After:

Best answer by erik_jan

Writing to a FGDB, you can specify a template.

The writer will use that template to define the output.

So, using an empty FGDB as a template will allow you to pre-define what the output should look like.

Hope this helps.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • Best Answer
  • December 30, 2019

Writing to a FGDB, you can specify a template.

The writer will use that template to define the output.

So, using an empty FGDB as a template will allow you to pre-define what the output should look like.

Hope this helps.


bobo
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • December 30, 2019

Writing to a FGDB, you can specify a template.

The writer will use that template to define the output.

So, using an empty FGDB as a template will allow you to pre-define what the output should look like.

Hope this helps.

I get it, I can copy one of FGDBs and delete all features in all feature class, then use this FGDB as template, I'll get an FGDB with original schema, wonderful solution! Thank you very much!


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • December 31, 2019

I get it, I can copy one of FGDBs and delete all features in all feature class, then use this FGDB as template, I'll get an FGDB with original schema, wonderful solution! Thank you very much!

Further, the tools in ArcMap for this are Create Feature Class/Create Table, which allow you to specify an existing Template FC/Table so effectively provide "blank" versions of then. Also an option is to use Truncate which can quickly delete all data from FCs and Tables and is far faster than Delete, but you do have to make sure you Compact the FGDB of using the Truncate method.


bobo
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • January 3, 2020

Writing to a FGDB, you can specify a template.

The writer will use that template to define the output.

So, using an empty FGDB as a template will allow you to pre-define what the output should look like.

Hope this helps.

Hi, I just found out that template didn't work when fanout expression was set, is this a bug or something else need to be set?


bobo
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • January 3, 2020

Further, the tools in ArcMap for this are Create Feature Class/Create Table, which allow you to specify an existing Template FC/Table so effectively provide "blank" versions of then. Also an option is to use Truncate which can quickly delete all data from FCs and Tables and is far faster than Delete, but you do have to make sure you Compact the FGDB of using the Truncate method.

What is Truncate method? I look it up and it seems that has something to do with Python which I'm not very familiar with. Can you show me an example?


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • January 4, 2020

What is Truncate method? I look it up and it seems that has something to do with Python which I'm not very familiar with. Can you show me an example?

@bobo

 

It is a standard ArcTool. Documentation here:

https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/truncatetable.htm