# Import a Metagraph from file

**URL:** <https://discourse.julialang.org/t/import-a-metagraph-from-file/8946>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [February 9, 2018, 12:52pm UTC](https://discourse.julialang.org/t/import-a-metagraph-from-file/8946 "2018-02-09T12:52:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cedric](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@cedric](https://discourse.julialang.org/u/cedric)\
**Post date:** [February 9, 2018, 12:52pm UTC](https://discourse.julialang.org/t/import-a-metagraph-from-file/8946/1 "2018-02-09T12:52:13Z")

</div>

Hi,

I’m new to Julia, and I wonder how to import a graph in Julia based on the following GML file :

```julia
graph
[
	label "testGraph"
	node
	[
		id 1
		compute 3
		storage 3
	]
	node
	[
		id 2
		compute 4
		storage 1
	]
	node
	[
		id 3
		compute 1
		storage 3
	]
	edge
	[
		id 1
		source 1
		target 2
		bandwidth 5
		delay 15
	]
	edge
	[
		id 2
		source 2
		target 3
		bandwidth 15
		delay 10
	]
	edge
	[
		id 3
		source 3
		target 1
		bandwidth 10
		delay 10
	]
]

```

As far as I understand, Graphs.jl does not support graph importation from file. Using LightGraphs.jl, I managed to import a graph, but only a SimpleGraph, which does not take into account the extra parameters. I guess I need a MetaGraph, but I have no idea how to import it. Is it possible ? Is there another way to import my graph in Julia ? Could you give me a quick code example ?

Thank you very much,  
Best regards,

---

<div class="post-metadata">

**Author:** ![anon94023334](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Post date:** [February 9, 2018, 8:07pm UTC](https://discourse.julialang.org/t/import-a-metagraph-from-file/8946/2 "2018-02-09T20:07:17Z")

</div>

Hi there,

Right now there is no GML importer for MetaGraphs - as you discovered, it’s only implemented for SimpleGraphs, which means that the metadata is ignored.
