Advanced Designer Learning Path is now live! Read More

What is the difference between import_bundle_from_archive to import_bundle_from_stream?

Level 3
What is the difference between import_bundle_from_archive to import_bundle_from_stream?

Hi

I trying to understand the difference between those 2 methods, and when we suppose to use each one.

Per this example:

Automate-bundle-export-import-python-script 

We are using import_bundle_from_archive when choosing export option of download_exported_bundle_archive_to_file

when we need to use it?

0 Kudos
5 Replies
Dataiker
Dataiker

Hi @arielma2304 ,

The difference between the two is that in

import_bundle_from_archive - you pass an archive path as a parameter and then the server will read it's content.

whereas in 

import_bundle_from_stream - you provide the actual bundle content as a parameter, the server doesn't read it from the path.

 

Regards,

Andrey Avtomonov
R&D Engineer @ Dataiku
0 Kudos
Level 3
Author

What archive path means?

0 Kudos
Dataiker
Dataiker

It's the path used when the bundle was exported from design node.

 

There are some examples here 

https://community.dataiku.com/t5/Using-Dataiku-DSS/Automate-bundle-export-import-python-script/m-p/2...

Andrey Avtomonov
R&D Engineer @ Dataiku
0 Kudos
Level 3
Author

but both methods gets at the end zip file of the exported bundle, so when each method should be used?

0 Kudos
Dataiker
Dataiker

I'm not sure I understand your last point about parameters being the same. Semantically they indeed represent the same thing - an exported bundle, but either you provide a path to the file or this file's content.

If your design and automation nodes are deployed to the same machine you can use import_bundle_from_archive and just pass the file path.

If they're on different machines then you'd have to read the file and pass it using import_bundle_from_stream

Andrey Avtomonov
R&D Engineer @ Dataiku
0 Kudos
A banner prompting to get Dataiku DSS