You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
No
<insertyourcodehere>
Describe the solution you'd like
After an ItemGraph is created from various items in an org, have the ability to write the contents in bulk to a JSON file.
Describe alternatives you've considered
I guess the output format doesn't have to be JSON, but it should be something very universal to read like XML, CSV, etc. although I know in this case CSV doesn't make a great choice given the nested nature of the dependencies.
Another option is to have a way to output the seperate parts of the ItemGraph individually. For example, with one call I can export just the items (nodes) to a flat file format. Then with a 2nd call I export all the dependencies (edges) as a flat table with columns for the id of the item depending on another item, a 2nd column with the ID of the item it is depending on, and then extra columns to describe the nature of the dependency.
Additional context
Currently the only option on the write_to_file method is a GML file. I'm not an expert on graph database file types and I didn't see a reference to the GML format type used in the Esri Python documentation for this class, but I assume that it is the format here: https://gephi.org/users/supported-graph-formats/gml-format/. The data structure shown looks very similar to JSON with nested elements and brackets to wrap them. What's different is GML doesn't use colons to separate the property name from the value. So if you want to read the file downstream in another system, and that system isn't aware of the GML format which seems pretty niche, then you're stuck. JSON is more universally supported as a readable data format. For me I'm thinking of FME specifically. My goal here is to use this class in python to pull together the dependencies between 100's of items in my org, and then write all that data to a data catalog database (think an item table and a relationship table where it can be used for Power BI or AGOL Dashboards reporting on how data is used. I'd prefer to have this python class do the work and then spit out one file of all the relationships for me to then use downstream in FME to do the delta check with the database and write any changes in relationships to the table. Since FME doesn't support this GML format (as of FME 2025), I guess I'd have to have more python code to loop over all items in the ItemGraph object and spit the data out to some other format that is usable downstream in FME.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
After an ItemGraph is created from various items in an org, have the ability to write the contents in bulk to a JSON file.
Describe alternatives you've considered
I guess the output format doesn't have to be JSON, but it should be something very universal to read like XML, CSV, etc. although I know in this case CSV doesn't make a great choice given the nested nature of the dependencies.
Another option is to have a way to output the seperate parts of the ItemGraph individually. For example, with one call I can export just the items (nodes) to a flat file format. Then with a 2nd call I export all the dependencies (edges) as a flat table with columns for the id of the item depending on another item, a 2nd column with the ID of the item it is depending on, and then extra columns to describe the nature of the dependency.
Additional context
Currently the only option on the write_to_file method is a GML file. I'm not an expert on graph database file types and I didn't see a reference to the GML format type used in the Esri Python documentation for this class, but I assume that it is the format here: https://gephi.org/users/supported-graph-formats/gml-format/. The data structure shown looks very similar to JSON with nested elements and brackets to wrap them. What's different is GML doesn't use colons to separate the property name from the value. So if you want to read the file downstream in another system, and that system isn't aware of the GML format which seems pretty niche, then you're stuck. JSON is more universally supported as a readable data format. For me I'm thinking of FME specifically. My goal here is to use this class in python to pull together the dependencies between 100's of items in my org, and then write all that data to a data catalog database (think an item table and a relationship table where it can be used for Power BI or AGOL Dashboards reporting on how data is used. I'd prefer to have this python class do the work and then spit out one file of all the relationships for me to then use downstream in FME to do the delta check with the database and write any changes in relationships to the table. Since FME doesn't support this GML format (as of FME 2025), I guess I'd have to have more python code to loop over all items in the ItemGraph object and spit the data out to some other format that is usable downstream in FME.
The text was updated successfully, but these errors were encountered: