Skip to main content
Question

FME Python API error writing to Tableau HYPER file


townest
Contributor
Forum|alt.badge.img+4

I have set up a python script to run a workspace through the FME Python API using FMEWorkspaceRunner. Python is throwing an error called 'FMEException: 1: Failure running workspace "<my path.fmw>" '. I did some troubleshooting by removing the HYPER writer and replacing with a csv writer, then a gdb writer. Both of those writers worked fine. Also, the workspace works fine without going through the API. Something about the HYPER and the API. Any suggestions or known issues?

 

Thank you,

 

Tyler

FME 2021

Python 3.7

5 replies

danminneyatsaf
Safer
Forum|alt.badge.img+12

Hi @townest​, would you be able to provide a copy of your workspace, python script, and sample source data? If you are not comfortable sharing your files publicly, I recommend submitting a support case where one of our Technical Support Specialists will be happy to help you.

 

I have not found any related information internally, so it sounds like this could possibly be a new bug with either the FME Python API or the HYPER writer.


townest
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • October 27, 2021
danminneyatsaf wrote:

Hi @townest​, would you be able to provide a copy of your workspace, python script, and sample source data? If you are not comfortable sharing your files publicly, I recommend submitting a support case where one of our Technical Support Specialists will be happy to help you.

 

I have not found any related information internally, so it sounds like this could possibly be a new bug with either the FME Python API or the HYPER writer.

I'll see what I can do replicating it with dummy data. Thx.


townest
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • October 27, 2021

@danminneyatsaf​ ,

I was able to replicate the issue with a simple data set and simple transformation.  The following script works writing to csv and errors writer to hyper.  Disable and enable the writers as necessary to test.   The fmw works on both csv and hyper without using Python API scripting.  

import sys
print(f'python verion:\n{sys.version}\n')
sys.path.append(r'C:\Program Files\FME\fmeobjects\python37'# correct version as of Oct 2021
import fmeobjects
 
wkspc_path = r'C:\temp\python_api_test_1.fmw'
wkspc = fmeobjects.FMEWorkspaceRunner()
print(f'workspace object:\n{wkspc}\n')
 
pnames = wkspc.getPublishedParamNames(wkspc_path)
print(f'default parameter names:\n{pnames}\n')
 
params = {}
for pname in pnames:
    params[pname] = wkspc.getParamDefaultValue(wkspc_path, pname)
print(f'parameter dictionary:\n{params}\n')
 
wkspc.runWithParameters(wkspc_path, params)
print(f'script complete')

To run this hands free, this script gets the parameter names and values to pass into the runWithParameters method.  Following is the input file:

col1,col2,col3,col4
1,cat1,red,500
2,cat1,blue,1000
3,cat2,blue,23
4,cat3,green,34

 


townest
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • November 12, 2021

@danminneyatsaf​ ,

 

Were you able to see the issue with the data provided? Let me know. Thx.

 

Tyler


danminneyatsaf
Safer
Forum|alt.badge.img+12
townest wrote:

@danminneyatsaf​ ,

 

Were you able to see the issue with the data provided? Let me know. Thx.

 

Tyler

Hi @townest​,

 

I was able to reproduce the same issue, thank you for sending the script and sample input file. I'm going to reach out to a developer and see what they think about this.

Likely we will have to file a bug report for this. Nothing from the python terminal really gives anything away as to what's causing the issue here, but in all likelihood this is something to do with the Hyper writer and the API as you mentioned.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings