I am wondering towards the error you receive. I presume that you used the GDrive webconnection in the FeatureReader to access the shapefile.
I would expect that the problem would be that it can't get multiple files, as is needed in the case of shapefiles. Is it possible to store the file as a ZIP-file? Possible with .SHZ extension to make it recognizable as a shapefile?
I am wondering towards the error you receive. I presume that you used the GDrive webconnection in the FeatureReader to access the shapefile.
I would expect that the problem would be that it can't get multiple files, as is needed in the case of shapefiles. Is it possible to store the file as a ZIP-file? Possible with .SHZ extension to make it recognizable as a shapefile?
Thank you @lars_de_vries. In this case I can't modify the datasource. Can I do that directly in the workflow ? (for example change shapefile 2 Geojson ?)
Thank you @lars_de_vries. In this case I can't modify the datasource. Can I do that directly in the workflow ? (for example change shapefile 2 Geojson ?)
What do you exactly mean with "I can't change the datasource", isn't it possible to change the workspace or isn't possible to change the filetype on GDrive?
I mean that if you would want to read GeoJSON you'll still have to change both.
What do you exactly mean with "I can't change the datasource", isn't it possible to change the workspace or isn't possible to change the filetype on GDrive?
I mean that if you would want to read GeoJSON you'll still have to change both.
I would say : "isn't possible to change the filetype on GDrive"
Hi @lalandexavier, I don't think FME readers can read any dataset directly from GoogleDrive shared link. After downloading all the files into a local folder with the GooleDriveConnector (Goole Drive Action: Download), you can then read them.
[Edited]
Creator -> GoogleDriveConnector 1 (List all files) -> GoogleDriveConnector 2 (Download all target files into a local folder) -> FeatureHolder (Wait for download to complete) -> Tester (Filter *.shp files) -> FeatureReader
I would say : "isn't possible to change the filetype on GDrive"
I did a test with my own GDrive and set the same GDrive in the Connector as in the FeatureReader. I selected the file manually and got a comma seperated list. Perhaps something like that is possible.
The list started with "fme://google-drive/" and than mentioned the filename and a list of properties containing 'id', the webconnection name in 'connection' and a property 'sidecars'. The sidecars is a comma-seperated list of all ids and subfiles.
fme://google-drive/file.shp?id=123&connection;=ConnectionName&sidecars;=345,file.shx,456,file.dbf,789,file.shx
Maybe you can built that string using a AttributeManager and an Aggregator.
Hi @takashi and @lalandexavier,
I got it to work, using the previously described method!
Hi @takashi and @lalandexavier,
I got it to work, using the previously described method!
Great. Thanks for sharing the technique.
Hi @lalandexavier, I don't think FME readers can read any dataset directly from GoogleDrive shared link. After downloading all the files into a local folder with the GooleDriveConnector (Goole Drive Action: Download), you can then read them.
[Edited]
Creator -> GoogleDriveConnector 1 (List all files) -> GoogleDriveConnector 2 (Download all target files into a local folder) -> FeatureHolder (Wait for download to complete) -> Tester (Filter *.shp files) -> FeatureReader
Thant you very much @takashi
Hi @takashi and @lalandexavier,
I got it to work, using the previously described method!
Thank you very much @lars_de_vries
Hi @lalandexavier @lars_de_vries
There is another way to read Shape Files directly from Google Drive using WebAsFileFormat. You can select Google Drive and browse to folder (similar to GoogleDrive Connector) and be able to select either a Single or Multiple Shape files.
This should also work in FeatureReader and any other transformer that support reading data
Hi @lalandexavier @lars_de_vries
There is another way to read Shape Files directly from Google Drive using WebAsFileFormat. You can select Google Drive and browse to folder (similar to GoogleDrive Connector) and be able to select either a Single or Multiple Shape files.
This should also work in FeatureReader and any other transformer that support reading data
The methode described workshop as well, but IT does not container the dynamic approach @lalandexavier was looking for, i.e. reading from alist of files
Hi @lalandexavier @lars_de_vries
There is another way to read Shape Files directly from Google Drive using WebAsFileFormat. You can select Google Drive and browse to folder (similar to GoogleDrive Connector) and be able to select either a Single or Multiple Shape files.
This should also work in FeatureReader and any other transformer that support reading data
Dear @rahulsharma, the problem in this case is to load many files in many folders, so it's not exactly what I need. Thank you :-)
Hi @lalandexavier, I don't think FME readers can read any dataset directly from GoogleDrive shared link. After downloading all the files into a local folder with the GooleDriveConnector (Goole Drive Action: Download), you can then read them.
[Edited]
Creator -> GoogleDriveConnector 1 (List all files) -> GoogleDriveConnector 2 (Download all target files into a local folder) -> FeatureHolder (Wait for download to complete) -> Tester (Filter *.shp files) -> FeatureReader
Dear @takashi, I don't understand how to configure the FeatureReader in this case. I'm downloading each Shapefile (11 files), and the FeatureReader read each files 11 times.
Hi @lalandexavier, I don't think FME readers can read any dataset directly from GoogleDrive shared link. After downloading all the files into a local folder with the GooleDriveConnector (Goole Drive Action: Download), you can then read them.
[Edited]
Creator -> GoogleDriveConnector 1 (List all files) -> GoogleDriveConnector 2 (Download all target files into a local folder) -> FeatureHolder (Wait for download to complete) -> Tester (Filter *.shp files) -> FeatureReader
This screenshot illustrates my intention. Supposing the user parameter "FME_TARGET_FOLDER" gives an existing folder path in the local disk.
This screenshot illustrates my intention. Supposing the user parameter "FME_TARGET_FOLDER" gives an existing folder path in the local disk.
Thanks @takashi in fact, this is more simple if I group the results
How can I do that and preserve the originals attributes of shapefile ?
This screenshot illustrates my intention. Supposing the user parameter "FME_TARGET_FOLDER" gives an existing folder path in the local disk.
All the attributes will be preserved but FME Workbench won't expose them automatically, since the schema of the source datasets cannot be retrieved when creating the workspace. If you know attribute names in the source datasets, you can expose them manually through the Attributes to Expose parameter in the FeatureReader or a subsequent AttributeExposer transformer.
All the attributes will be preserved but FME Workbench won't expose them automatically, since the schema of the source datasets cannot be retrieved when creating the workspace. If you know attribute names in the source datasets, you can expose them manually through the Attributes to Expose parameter in the FeatureReader or a subsequent AttributeExposer transformer.
It's perfect @takashi thank you very much !