Importing .EGP projects to a SAS® Viya® flow fails with a "Dataflow creation error..."


When you try to import .EGP projects from the command line interface (CLI) to SAS Viya flows, the following error can occur: 

Name        Project.egp
State       Completed with errors
...
Message

Dataflow creation error - check logs - org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request on POST request for "/dataFlows/dataFlows": "{"version":2,"httpStatusCode":400,"message":"Failed to add the object to folder: Post \"https://sas/path:%20/folders/folders/members\": dial tcp: lookup sas on 10.0.0.10:53: no such host","details":["path: /dataFlows/dataFlows","correlator: f431bfc6-24d0-45fb-a6e9-a97b98a488c9"]}"

import-9 tries to create the targetFolder tree structure in its entirety. (That is, create \Users, then create \Users\<userid>, and so on...) The first POST to the folders service to create \Users fails with a 403 error as expected. The subsequent posts also fail but use invalid requests—presumably based on an interpretation of the response of the previous failed request. 

Workaround

To work around this issue, do either of the following: