<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Merge with field mapping in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560854#M43888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Randy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks that worked, at some point i thought it was the Merged Join features so i tried&lt;/P&gt;&lt;PRE class=""&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;'"' + HwyNpaPub + ';' + HwyNpaPr + ';' + HwyCan + ';' + HwyG + ';' + HwyNP + '"','D:/GIS Folder/HighwayDistricts.gdb/TEST'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Sep 2019 20:14:15 GMT</pubDate>
    <dc:creator>CCWeedcontrol</dc:creator>
    <dc:date>2019-09-06T20:14:15Z</dc:date>
    <item>
      <title>Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560846#M43880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp; am trying to merge five layers into one with only three fields. The code merges the layers fine with out error but the output layer has all the layers fields and the RD_Owner field doesn't have the attributes merged. so i am guessing my fieldmapping isn't correct. I would appreciate any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;HwyNpaPub = 'C:/Temp/HighwayDistricts.gdb/HWY1'
HwyNpaPr = 'C:/Temp/HighwayDistricts.gdb/HWY2'
HwyCan = 'C:/Temp/HighwayDistricts.gdb/HWY3'
HwyG = 'C:/Temp/HighwayDistricts.gdb/HWY4'
HwyNP = 'C:/Temp/HighwayDistricts.gdb/HWY5'

FieldMapString = '''

STREET "STREET" true true false 50 Text 0 0,First,#,{0},STREET,0,11;
ROAD_TYPE "ROAD_TYPE" true true false 70 Text 0 0,First,#,{0},ROAD_TYPE,0,11;
RD_Owner "RD_Owner" true true false 255 Text 0 0 ,Join,#, {0}, RD_Owner,-1,-1;

'''

def Layers1(HwyNpaPub,HwyNpaPr,HwyCan,HwyG,HNP1):
    fieldmappings = arcpy.FieldMappings()
    fieldmappings.loadFromString(FieldMapString)
    return fieldmappings

def main(args=None):
        if args is None:
                args = sys.argv


arcpy.Merge_management([HwyNpaPub, HwyNpaPr, HwyCan, HwyG, HwyNP], 'D:/GIS Folder/HighwayDistricts.gdb/TEST', Layers1(HwyNpaPub, HwyNpaPr, HwyCan, HwyG, HwyNP))&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:12:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560846#M43880</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T00:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560847#M43881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perhaps your &lt;EM&gt;true&lt;/EM&gt; and &lt;EM&gt;false&lt;/EM&gt; should be &lt;EM&gt;True&lt;/EM&gt; and &lt;EM&gt;False&lt;/EM&gt; if they do indeed represent booleans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 15:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560847#M43881</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-09-04T15:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560848#M43882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the "true true false" is using the right case based on my experiences with field mapping.&amp;nbsp; I think the field you are mapping needs the feature name included&amp;nbsp;as in:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;STREET "STREET" true true false 50 Text 0 0,First,#,{0},{0}.STREET,0,11;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;{0}.STREET&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 16:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560848#M43882</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2019-09-04T16:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560849#M43883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys, thanks for the replay. Changing the&lt;EM&gt; True&lt;/EM&gt; and &lt;EM&gt;False&lt;/EM&gt; to upper case and adding {0}.STREET also didn't do anything. The layer still got merged but the fieldmapping didn't.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 16:54:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560849#M43883</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2019-09-04T16:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560850#M43884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are mapping field not allowed with the Merge? I guess i am not seeing what i am doing wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 21:24:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560850#M43884</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2019-09-05T21:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560851#M43885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Field mappings have always been a bit confusing for me.&amp;nbsp; To see how various tools use mappings, I will put some test features into ArcMap and then run a tool like &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/merge.htm"&gt;Merge&lt;/A&gt;&amp;nbsp;and then copy&amp;nbsp;the Python snippet of the tool's last run under Geoprocessing &amp;gt; Results.&amp;nbsp; This will show all the parameters used for a specific running of the tool.&amp;nbsp; Then you can see how the mappings were formatted and create a script that will format your variables in a similar fashion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using that approach, it looks like the field mappings&amp;nbsp;would be&amp;nbsp;something like:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;STREET "STREET" true true false 50 Text 0 0,First,#,Feature1,STREET,0,11,Feature2,STREET,0,11,Feature3,STREET,0,11;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;where Feature1, Feature2 and Feature3 would be the 3 layers that are being merged into the STREET field of the new, merged feature.&amp;nbsp; (I am assuming the 0, 11 are the correct values used by the features you are merging.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 21:56:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560851#M43885</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2019-09-05T21:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560852#M43886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;FieldMapString &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;'STREET &lt;SPAN class="string token"&gt;"STREET"&lt;/SPAN&gt; true true false &lt;SPAN class="number token"&gt;50&lt;/SPAN&gt; Text &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,{0},STREET,0,11;\&lt;/SPAN&gt;
ROAD_TYPE &lt;SPAN class="string token"&gt;"ROAD_TYPE"&lt;/SPAN&gt; true true false &lt;SPAN class="number token"&gt;70&lt;/SPAN&gt; Text &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,{0},ROAD_TYPE,0,11;\&lt;/SPAN&gt;
RD_Owner &lt;SPAN class="string token"&gt;"RD_Owner"&lt;/SPAN&gt; true true false &lt;SPAN class="number token"&gt;255&lt;/SPAN&gt; Text &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;Join&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#, {0}, RD_Owner,-1,-1'''&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Got rid of the \n 's within the string by reformatting with line continuation ( \ ) and removed the last ; (semi-colon) in your string, which I presume that you have to split on the ; (semi-colons)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:12:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560852#M43886</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T00:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560853#M43887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was having success with the following:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

outFeature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'D:/GIS Folder/HighwayDistricts.gdb/TEST'&lt;/SPAN&gt;

features &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;'C:/Temp/HighwayDistricts.gdb/HWY1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;'C:/Temp/HighwayDistricts.gdb/HWY2'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;'C:/Temp/HighwayDistricts.gdb/HWY3'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;'C:/Temp/HighwayDistricts.gdb/HWY4'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;'C:/Temp/HighwayDistricts.gdb/HWY5'&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

fields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;'STREET &lt;SPAN class="string token"&gt;"STREET"&lt;/SPAN&gt; true true false &lt;SPAN class="number token"&gt;50&lt;/SPAN&gt; Text &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,{0};', '{0},STREET,0,11'],&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;'ROAD_TYPE &lt;SPAN class="string token"&gt;"ROAD_TYPE"&lt;/SPAN&gt; true true false &lt;SPAN class="number token"&gt;70&lt;/SPAN&gt; Text &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,{0};', '{0},ROAD_TYPE,0,11'],&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;'RD_Owner &lt;SPAN class="string token"&gt;"RD_Owner"&lt;/SPAN&gt; true true false &lt;SPAN class="number token"&gt;255&lt;/SPAN&gt; Text &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;Join&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,{0}', '{0}, RD_Owner,-1,-1']&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

fmap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fld &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    fm &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; features&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        fm&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fld&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    fmap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fmap &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; fld&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fm&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; fmap
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;';'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Merge_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
    inputs&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;';'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# semicolon delimited&lt;/SPAN&gt;
    output&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; outFeature&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    field_mappings&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fmap
    &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The print statements output the following:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;STREET "STREET" true true false 50 Text 0 0,First,#,C:/Temp/HighwayDistricts.gdb/HWY1,STREET,0,11,C:/Temp/HighwayDistricts.gdb/HWY2,STREET,0,11,C:/Temp/HighwayDistricts.gdb/HWY3,STREET,0,11,C:/Temp/HighwayDistricts.gdb/HWY4,STREET,0,11,C:/Temp/HighwayDistricts.gdb/HWY5,STREET,0,11;ROAD_TYPE "ROAD_TYPE" true true false 70 Text 0 0,First,#,C:/Temp/HighwayDistricts.gdb/HWY1,ROAD_TYPE,0,11,C:/Temp/HighwayDistricts.gdb/HWY2,ROAD_TYPE,0,11,C:/Temp/HighwayDistricts.gdb/HWY3,ROAD_TYPE,0,11,C:/Temp/HighwayDistricts.gdb/HWY4,ROAD_TYPE,0,11,C:/Temp/HighwayDistricts.gdb/HWY5,ROAD_TYPE,0,11;RD_Owner "RD_Owner" true true false 255 Text 0 0 ,Join,#,C:/Temp/HighwayDistricts.gdb/HWY1,RD_Owner,-1,-1,C:/Temp/HighwayDistricts.gdb/HWY2,RD_Owner,-1,-1,C:/Temp/HighwayDistricts.gdb/HWY3,RD_Owner,-1,-1,C:/Temp/HighwayDistricts.gdb/HWY4,RD_Owner,-1,-1,C:/Temp/HighwayDistricts.gdb/HWY5,RD_Owner,-1,-1

C:/Temp/HighwayDistricts.gdb/HWY1;C:/Temp/HighwayDistricts.gdb/HWY2;C:/Temp/HighwayDistricts.gdb/HWY3;C:/Temp/HighwayDistricts.gdb/HWY4;C:/Temp/HighwayDistricts.gdb/HWY5‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My test values were slightly different than yours as I am not completely sure of your set-up. &amp;nbsp;I ran this outside ArcMap, hence the path to the features.&amp;nbsp; If you have a map with the layers added, you could substitute the layer names for the layer path in ArcMap's Python window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the '0 ,11' and '-1,-1'&amp;nbsp; in your field map&amp;nbsp;indicate the start and end positions&amp;nbsp;of the data being transferred.&amp;nbsp; 0,11 would be the first 12 characters of the field's data, and -1,-1 would take the whole field.&amp;nbsp; In my experience, if the field data being transferred is bigger than the target field size, an error will occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not tested for spaces in feature names/paths, nor have I tested&amp;nbsp; where renaming the field is attempted with field mapping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:12:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560853#M43887</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-12T00:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560854#M43888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Randy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks that worked, at some point i thought it was the Merged Join features so i tried&lt;/P&gt;&lt;PRE class=""&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;'"' + HwyNpaPub + ';' + HwyNpaPr + ';' + HwyCan + ';' + HwyG + ';' + HwyNP + '"','D:/GIS Folder/HighwayDistricts.gdb/TEST'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2019 20:14:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560854#M43888</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2019-09-06T20:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/1365402#M69520</link>
      <description>&lt;P&gt;i'm trying to use your python to merge 25 or so shp files and map the fields but using the code i get a strange output&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StuartMoore_0-1704212040714.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90291i01A26C054EF290AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StuartMoore_0-1704212040714.png" alt="StuartMoore_0-1704212040714.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 16:14:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/1365402#M69520</guid>
      <dc:creator>StuartMoore</dc:creator>
      <dc:date>2024-01-02T16:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Merge with field mapping</title>
      <link>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/1365426#M69521</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/159798"&gt;@StuartMoore&lt;/a&gt;, this is a very old thread. I suggest creating a new question with the code you're running and reference the post from&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/126818"&gt;@RandyBurton&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560853/highlight/true#M43887" target="_blank"&gt;https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/560853/highlight/true#M43887&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 16:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/merge-with-field-mapping/m-p/1365426#M69521</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2024-01-02T16:44:31Z</dc:date>
    </item>
  </channel>
</rss>

