I got a new computer which means a completely fresh install of Desktop at 10.4.1 which means no more rolling GDBTools forward. I really liked being able to visualize the state tree and want to try to replicate it using python. I'm grabbing the state list using
<SPAN class="keyword token">use</SPAN> sde
<SPAN class="keyword token">select</SPAN> sde<SPAN class="punctuation token">.</SPAN>sde_states<SPAN class="punctuation token">.</SPAN>state_id<SPAN class="punctuation token">,</SPAN> parent_state_id<SPAN class="punctuation token">,</SPAN> lineage_name<SPAN class="punctuation token">,</SPAN> name
<SPAN class="keyword token">from</SPAN> sde<SPAN class="punctuation token">.</SPAN>SDE_states
<SPAN class="keyword token">left</SPAN> <SPAN class="keyword token">join</SPAN> sde<SPAN class="punctuation token">.</SPAN>SDE_versions
<SPAN class="keyword token">on</SPAN> sde<SPAN class="punctuation token">.</SPAN>sde_states<SPAN class="punctuation token">.</SPAN>state_id
<SPAN class="operator token">=</SPAN> sde<SPAN class="punctuation token">.</SPAN>sde_versions<SPAN class="punctuation token">.</SPAN>state_id
<SPAN class="keyword token">order</SPAN> <SPAN class="keyword token">by</SPAN> state_id<SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
but I'm having trouble sorting the states into their branches however. Anyone at esri have some advice?