Member since
03-18-2019
4
Posts
0
Kudos Received
0
Solutions
03-18-2019
09:08 PM
I'm able to perform an Import with cURL (as per documentation) using the same zipped file previously exported. This is just to confirm the the export ZIP is not corrupted.
... View more
03-18-2019
09:08 PM
Finally figured it out! The problem was the files entry in the request. The correct one is: files = { "data" : (None, open(local_filename, "rb"))}
... View more
03-18-2019
09:08 PM
Hi all, I'm trying to perform an import in Atlas using Import API by leveraging Python Requests. I have successfully exported data in a ZIP file previously using Python Requests. Now, when I try to import data (on the same Atlas instance where I exported data from) I get an Null Pointer Exception Error. Below is the code used to call Atlas Import API: headers = { "Cache-Control" : "no-cache" }
local_filename = "/tmp/backup.zip"
r = requests.post(
self.__import_api_url, # this is Atlas Server URL for Import API
headers = headers,
files = { "file" : (local_filename, open(local_filename, "rb"))},
auth = (self.__user, self.__pwd) # authentication username and password
) The response from Python Requests is: {"errorCode":"ATLAS-500-00-001","errorMessage":"java.lang.NullPointerException: "in is null","errorCause":"in is null"} Attached there is the log file generated by Atlas. Atlas_import_error.txt Any help is much appreciated! Thanks, Alessandro
... View more
Labels:
- Labels:
-
Apache Atlas