Creating and organizing workspaces. How to use Workbench.
Recently active
I’ve got an FME workbench that picks up 2 seperate SQL tables in the two readers and the data is sorted and the filtered. It then needs to be output to an Excel template containing 2 tab sheets and save the data from each SQL table onto the separate sheets.Test copy of workbench looks like this:This first attempt only outputted the data from the first reader onto both tab sheets in excel.Then did this:So this did pick up both readers but instead of saving the one excel template with the data outputted to both tab sheets, it created to excel files with the data being populated on the tab sheet.Essentially I want to pick up both sql readers, sort them and filter them and then output to the excel template but the data gets saved onto sheet 1 and sheet 2 for example for each reader and then save the one excel file to the drive location!Am I missing a step or should i be using different transformations, etc?Appreciate any suggestions?
This script works, but leaves out the geometry and original attributes. My hunch is there’s something wrong with the close(self) function, but I’m stumped. The code takes a feature id number and list of nearby ids from a NeighborFinder list, where it matches them up and assigns a _group_id attribute to use with the Aggregator. Really, it should be part of NeighborFinder. The way I had been grouping features is to use two or more AttributeCreators and assign a common Id from the feature and id list. It’s a hassle because you end up with duplicate features. Very inelegent. I have seen a few posts on missing attributes, but I can’t see how they apply to my code: import fmeimport fmeobjectsfrom collections import defaultdictclass FeatureProcessor(object): def __init__(self): self.og_ids = [] self.closest = [] self.lines = [] def input(self, feature: fmeobjects.FMEFeature): id_number = feature.getAttribute('_count_Glaz_H') if id_number is not
I was installing a Python module and pipeline (spaCy and en_core_web_sm.whl) into FME2023.2.4. spaCy installed fine, but pip would not install the pipeline and I got this message: Since then, my FME 2023.2.4 will not work, at all. No translations will work. I made a blank Workspace with just a Creator and still immediately got: “Error running translation”.What’s going on? Did I break it? Do I need to reinstall? My FME2023.2 works fine with the same Workspace.Any help is appreciated.
FME(R) 2023.1.1.0 (20230928 - Build 23631 - WIN64) FME FormHello,I have a set of QAQC workspaces that I’m trying to run in sequence with workspace runners. I have a parent workspace that, using scripted parameters, generates a bunch of output file names where I’ll write the results of the various workspaces, and runs workspace 1, then workspace 2 then workspace 3. I only want to run workspace 3 if my tests ‘Pass’ in workspace 2. So I write out a CSV file called _qaqc_status.csv in workspace 2 with ‘Pass’ or ‘Fail’ as the only attribute; the file location is in with the data and is variable.The problem comes when trying to read the parameterized file name ($(QAQC_STATUS_CSV)) with a FeatureReader; I get the following error message Worker 27572 > CSV reader: Failed to open file '' for reading. Etc, etc.and my CSV doesn’t show up on the output ports. If I hard code the FeatureReader dataset to an existing csv it works fine.Any help is appreciated, or even a workaround suggestion. Th
I am trying to join a SharePoint table with no geometry to a set of polygons (about 2000 rows). The table has unique project titles for for each polygon that I want to use as a join field; but the polygons themselves are stored as fgdb files deeper within the SharePoint file structure and they are a non-standardized legacy dataset that I am trying to aggregate (hence why I am transferring them all over to SharePoint as the first step). When writing the fgdb’s I am also exposing the file path as the fme dataset field, so the unique project id’s in the table are a part of that file path. I am trying to use the string replacer to replace all the characters leading up to, and after, the project title with nothing so that only the project title is exposed. Sadly I can’t just count the characters as there are different folders within the file path with different names and character lengths so now I am trying to come up with a more complicated regex expression that will trim the start and th
Hi, I have a geojson including an attribute with datestamp values. An example value is 202410231836 (year, month, date, hours, minutes - yyyy mm dd hh mm). These are important as I’m running testFilters with it. However I would also like to create a parallel attribute showing an easy to read UK date value from it. So, 202410231836 would convert to ‘31/10/2024 18:36’.I’ve been looking at DateTimeConverter transformer but couldn't work out what import format to use and what output format to pick - assuing that DateTimeConverter is the one to use.Any advice would be appreciated. Thanks,Stuart
Hello Forum, I have a workspace which reads in a tab file with a start_date attribute and end_date attribute. These are populated with datestamp values (e.g.: 202410281200). That reader flows to a TestFilter which determines if today is before the start date. If so, these records go to a new output writer for sites not yet started. If today is beyond the start date. These then go on to a second testFilter, which determines if the end date has been reached or not. If the end_date has been reached, then this goes to an output writer for historic sites If the end_date has not yet been reached, then this goes to a output writer for live sites. These test Filters are doing exactly what I want them to do. However it can be the case that sometimes there are no sites where the start_date has not yet been reached. In these cases I need the output to be an empty table. However, I’m finding that the flow is failing to overwrite any previously created tables where, for instance, at a time when it
I need to select the lines that fall entirely within a specific polygon and update their data with the respective polygon name. I attempted to use a spatial filter, but it didn't work as expected. When a line intersects two polygons, the filter selects and attributes the line to only one of the polygons, which is causing issues. I also tried using the NeighborFinder without success. I've attached a screenshot to illustrate a line segment that should not be selected within this polygon.
Hello,I have a script which is written like this:import osparent = os.path.abspath('..')file= os.path.abspath('../file_08-06-2024.xls')return fileI would like to replace the date with an attribute defined in a attributeCreator transformer which could change and i write this :file=os.path.abspath('../file_$(date).xls')When i run, it doesn't work. Can you help me ?Thank you.
Hi,A very random question. My son has recently started to like making mazes out of Lego for marbles. I was wondering if there was a way in FME I could perhaps randomly generate a maze?I know there are a bunch of generators on the internet, however they do not account for a cell size of 2x2, to accommodate a marble, or a wall thickness of 1. I see there is a generator on FME Hub, but it also doesn’t work because it calls a webpage that doesn’t exist anymore. So I thought perhaps I might have a go but I can’t work out a way to use any maze generation algorithms. I don’t know python, but I’m reasonably handy at desktopIf anything glaringly obvious comes to mind I’d love to hear itThanks
I have a workspace in FME Form 2021. It includes a writer for Automation. This writer creates the keys in the Automation I have created in FME Flow 2021. These keys are based on 4 Attributes I created and renamed in my workspace. When I change the attribute names, run the workspace, and upload it to FME Flow, they are reflected in the writer but are not written to the Automation I created that includes this workspace in FME Flow. The Automation still includes the old key names. ...but...after I run/upload the workspace as explained in the above paragraph, then delete the writer and re-add it into the workspace then run it/upload it again, this then it updates the keys in my Automation. Has anyone else encountered a situation like this?
Hello,I was hoping to get your input into how to speed up the following workflow:Read an Excel File with several sheets from a Network Share → Output each sheet to a different output port → Create a CSV file for each output port in a network share.I already have the above working, the problem is that CSV writer is taking a loooong time writing the files. My connection to the network is pretty good so it is not a matter of latency between my PC and the network share (at least I don’t think so).Does anyone have any idea on how to improve the writing speed of the CSV files or what to do improve the overall time it takes for the workflow to complete?.Thanks in advance.RZ.-
Hi forum, I’m trying to do something I successfully used many times before. But for some reason it’s not working this time. I’ve delved into it and done research but I can’t work it out. It’s a really simple thing. I just need to read in three csv files with identical schemas into one FeatureReader. I have a Creator, connected to a FeatureReader. In the FeatureReader I’ve selected CSV as the format. In Dataset I selected the three dots (…), browsed to the data source location and then selected the three files. So, now in Dataset I have this: "E:\FME temp source data\Scratch\TestPoints\one.csv","E:\FME temp source data\Scratch\TestPoints\three.csv","E:\FME temp source data\Scratch\TestPoints\two.csv" In FeatureReader I have ‘One per feature type’ selected in Output ports. But, when this is read in, only one output port is created in the FeatureRader. That one output port is called csv and it includes all the records from the three inputs in the one output. How do I force it to create
I’m trying to connect to our SAP Datasphere but can’t establish a working connection. The settings and parameters are similar to the ones i used with were i could get a connection. There is a Proxy Server involved.Any ideas what i have to do different to get working Database connection?Not shown in the screenshot is the parameter proxyPassword
I am trying to clip a ECW raster by a rectangle polygon but the inside output is incomplete. Only a small slice of the ECW is in the output as you can see below.Is there something I am doing wrong? FME 2023.2Thank you for your help
I have a large Workspace that processes multiple .dwg files along with a single Excel and .dbf file to generate one Excel file with multiple sheets. This works fine when I have feature caching on, but obviously takes a long time. When I try to run it without feature caching, the feature output is a fraction of what it should be, but still gets data from all the multiple dwg files selected, as opposed to grabbing from one file. The only thing that comes to mind is that without feature caching, it does not wait until all features are processed. So, what am I missing? Is there a ‘WaitUntilAllFeaturesAreProcessed’ transformer or setting? Or, should my approach be some flavor of batch processing? I haven’t seen anything in this forum that matches my situation. Any insight is appreciated. Thanks,-Loren
Hey ya'll, I've been playing around with deployment parameters in Flow and Form but I have been wondering if it's possible to use an existing deployment parameter in Form, without a database connection that has the same credentials? So for example accesing database X through deployment parameters without having database X defined in your local database connections. I've tried to but to no avail.
Hello,Hope for your advice how to implement my idea.I have an FME workbench that is triggered by web application. In case workbench failed, I need to update a record in PostgreSQL database. I wander how I can implement this, because if process already failed, how I can run SQLexecutor transformer after that?I thought about Automation, but what would be the trigger in this case? I don’t see anything suitable in the list. Taking into account that I don’t need to run workbench by trigger, since it is triggered by user in web application.The main need is to let application know that FME workbench has failed. There might be some obvious solution for this which I don’t know :)
Hello Forum, What is the best method for moving an entire folder (which includes subfolders, each containing files) from location A to location B? I’ve looked into File Copy, but that doesn’t seem to do the job. Well, I couldn’t see how it can told to do so. In addition there didn't appear to be a writing option (to set the destination location) within it. I’ve also look into the ‘Select Multiple Folders/Files option in FeatureReader. I can see that I can select an entire folder but it’s asking for a Format. Typically when using a FeatureReader, say for reading in a shapefile, I’d choose ESRI Shapefile. But this is different. Here I’m picking an entire folder with contents. So, what ‘format’ would I choose, if indeed this is the right approach? I’m keen to get this sorted as I need to place a schedule on to it through FME Flow. Thanks,Stuart
Hello,I am trying to write several files in NetCDF format with FeatureWritter; but after writing the first one it gives me this error: NetCDF writer: Failed to define variable. The error was 'NetCDF: String match to name in use' If anyone has experienced this and can help me First of all, Thanks
When I open an “old” FME workspace in FME 2024 I get the following confusing dialog:attributes unsupportedIt is related to a Bufferer and what I want to do is use fme_geometry in a subsequent Tester to find out if the feature has become a donut.So I wondered if “fme_geometry” is deprecated, but it doesn’t seem so.What is this all about ? What are disabled attributes ? If I leave them enabled: why can I do so ? Who disables the attribute ?I use FME for 20 years now and I am completely confused.
Hi, I am trying to publish a file to a certain folder once per month by using FME workbench. Currently, the file is generated daily with the filename format of YYYYMMDD. And in the destination folder, there is a single file for each month, e.g. 20240101, 20240203, 20240302, etc. For example, if I run the workbench and generate the file on 20240601, the file should be published to the destination folder as there was no existing files in the folder with YYYYMM=202406. However, when I run the workbench again on 20240602, the file should not be published to the destination folder, as there is already one for 202406. Any help would be appreciated.
Hi all,I can’t seem to get the Offsetter to properly take this geometry - it keeps rejecting (properties below).I broke out this to another workbench and it worked find with a simple solid - just wondering what is happening here as I can’t seem to figure it out. The geom. disappears after the offset.Any clues as to what is happening?Thanks!
I am on Form 20240521, build 24219 on Windows 10 and I am getting the error stated in the title. Following the discussion in I checked my path. FME is in the path and the path currently has a length of 1652 characters.The plugin directory exists and there are 62 directories and 400 files inside…The error warning shows up several times, two times in relation to two different FeatureReaders (version 14) .FeatureReader 1:format: shapefile error: Error prepending 'C:\Program Files\FME_23781\plugins' to path environment variable.FeatureReader 2:format: geopackage error: Error prepending 'C:\Program Files\FME_23781\plugins\gdal' to path environment variable.The next time the error shows up is in relation to a FeatureWriter:format: Esri Geodatabase (File Geodb) error: Error prepending 'C:\Program Files\FME_23781\plugins\..' to path environment variable.Any suggestion on how to deal with this, apart from what was mentioned in then earlier thread?
I need to create unique Ids for a point feature class. Also, when a new point is added to the class I need to the unique Id created automatically when the workspace is run. I have created a workspace that includes the File Geodatabase Point Feature Class Reader then the Counter Transformer to create a new field named _count and a new field in AttributeManager named Facility_ID. All the unique Ids will be formatted as follows: BLDG-000000001, BLDG-000000002, etc…When a new Building Point is added to the Feature Class, the Facility_ID field will automatically be populated with a unique ID in sequence increments of 1; example if the highest unique id in the feature class is BLDG-000000109, then when a new building is added it’s unique id will be BLDG-000000110. What else do I need to do? any assistance is much appreciated.