Skip to main content

Hello & Happy New Year

 

Whilst testing this transformer I realised that if I set it to:

  • Download "As File"
  • Download To Folder "Intentionally set to wrong location"

 

OneDrive-Connector 

Then the invalid setting is not rejected nor the cog changing its colour to red.

Is this by design?

 

If I, of course, amend the ObjectID then the feature will be rejected.

I also set the target folder (wrong location) as an attribute and same result

 

Thanks

Sameer

Hi @sameer​ ,

 

Setting the download to folder using an attribute value makes the OneDriveConnector parameters valid. If you had an invalid path as one of the "DownloadLocation" attribute values, I'd expect the OneDriveConnector to send that feature to the rejected port. Are you able to confirm whether the file will still download or if it is rejected?


Hi @sameer​ ,

 

Setting the download to folder using an attribute value makes the OneDriveConnector parameters valid. If you had an invalid path as one of the "DownloadLocation" attribute values, I'd expect the OneDriveConnector to send that feature to the rejected port. Are you able to confirm whether the file will still download or if it is rejected?

Hi @chrisatsafe​ 

 

If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.

 


Hi @chrisatsafe​ 

 

If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.

 

I see, it sounds like you're going to need to check if that directory exists before passing the downloadlocation attribute value into the OneDriveConnector.

 

You can check with a FeatureReader before the OneDriveConnector by setting the format to Directory and File Pathnames and the dataset to the downloadlocation attribute.

2021-01-12_10-34-05Next, connect the Initiator port to the OneDriveConnector - anything that comes out of the initiator port indicates that the path exists, anything that comes out of the rejected port indicates that the path does not exist. At this point, if you still want to download the rejected features, you could change the path value of the downloadlocation attribute using an attributemanager/other.


Hi @chrisatsafe​ 

 

If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.

 

That's exactly what I've done already to overcome this problem.

OneDrive-FeatureReaderJust want to know why the transformer would not reject:

 

1) An invalid download location

2) Create the folder instead if it does not exist

 


Hi @chrisatsafe​ 

 

If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.

 

A path that does not exists is not invalid in FME's eyes. Workbench isn't checking for existing paths and has the ability to create folders for this reason; this makes fanouts possible.

 

The only reason you'd see features being rejected would be if you were trying to write to a non existent drive as FME will not create drive partitions.


Hi @chrisatsafe​ 

 

If "Download to Folder" is set for instance to "E:\\FME Workbench\\JWS\\Abc\\", knowing that "Abc" folder does not exist then that folder is automatically created which I do not want as well as the file being downloaded to that new location.

 

I'll bear this in mind as the transformer is doing this by design.

Thanks for your help.


Reply