Hey All!
I am very new to Python so I apologize up front!
I am building a tool in KNIME that pulls data from the BLS API and lets the user custom build a report via the QuickForm nodes. I can get it to work just fine with the quick forms and it will return the report which is fantastic.
My issue is I want to use startyear and end year as variables inside of the Python code so the use can pick them via the Quick Form nodes. But for some reason the API is not accepting them for some reason.
For reference this is the original code:
data = json.dumps({âseriesidâ: [âCUUR0000SA0â,âSUUR0000SA0â],âstartyearâ:â2011â, âendyearâ:â2014â})
As you can see inside my Python I am using a variable for âseriesidâ and this works. Itâs just the year variables that are note.
data = json.dumps({âseriesidâ: [flow_variables[âSeries Idâ]],âstartyearâ: [flow_variables[âstart_yearâ]], âendyearâ: [flow_variables[âend_yearâ]]})
Any thoughts and suggestions are greatly appreciated!!
Here is the workflow (use the Report Builder component):