Skip to main content
Solved

Add data from a table containing file paths

  • July 8, 2014
  • 7 replies
  • 19 views

Forum|alt.badge.img
Dear FMErs

 

 I have a table that contains file paths of lots of features that I need to migrate. Is there a way to read the file paths from the table to load all of the needed features? Any thoughts? Suggestions?

 

 

Thanks in advance. Have a great day

Best answer by takashi

Hi Gerardo,

 

 

If you read multiple file paths from a table, you can create a concatenated paths string (delimiter is white space), and pass it to the source dataset parameter of the main workspace through the WorkspaceRunner.

 

Each path and entire string should be quoted like this.

 

""<path1>" "<path2>" "<path3>" ... "<pathN>""

 

If a path string doesn't contain spaces, it's not essential to quote it. But I think it's better to quote always individual paths to avoid unexpected conditions.

 

 

Takashi
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

david_r
Celebrity
  • July 8, 2014
Hi,

 

 

two alternatives:

 

 

- Read the file paths, send to FeatureReader

 

 

- Read the file paths, send to WorkspaceRunner and second workspace with parametrized input file name

 

 

David

Forum|alt.badge.img
  • Author
  • July 8, 2014
David, hi. Thanks for your respond.  Any sugestions on  how to read the file paths? I was surfing the documentation but couldnt find  anything regarding this topic. I might be using the wrong key words. Thanks you for any input on how to read the tile paths

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 8, 2014
in the readers collection there is a "Directory and File Pathnames" reader.

Forum|alt.badge.img
  • Author
  • July 8, 2014
Gio, thanks. I looked into this as well, with the directory and file path reader, the user needs to provide a file path, I have that file paths stored as attributes in a table. So far I have hit a wall.. Thanks for you for your suggestion :)

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 8, 2014
...filepath attribute... srry for bad grammar.

takashi
Celebrity
  • Best Answer
  • July 9, 2014
Hi Gerardo,

 

 

If you read multiple file paths from a table, you can create a concatenated paths string (delimiter is white space), and pass it to the source dataset parameter of the main workspace through the WorkspaceRunner.

 

Each path and entire string should be quoted like this.

 

""<path1>" "<path2>" "<path3>" ... "<pathN>""

 

If a path string doesn't contain spaces, it's not essential to quote it. But I think it's better to quote always individual paths to avoid unexpected conditions.

 

 

Takashi

Forum|alt.badge.img
  • Author
  • July 9, 2014
Thanks David, Gio and Takashi. I got my workbench to work how I intended. Your ideas and approaches defenetly made me think outside the box. Now I have an mxd that formats the input  data and generates a text file that I can use for a quick copy past on the workbench that runs the process.

 

Thanks again, glad to be part of the community