Python Parameters

Hi there,


I've set up some parameters which I'm using in my python script, but since they're set up as SQL, re-running the report has to unnecessarily refresh all the data. Is there any way to get around this?

(Ideally parameters meant to filter the SQL data could work on the SQL data after the initial query is run, but that's an altogether more complicated question.)



4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Isaac ,

    Perhaps you can use report filters?

    These don't work with Python Notebook though.   

    Reply Like
  • Thanks Donna. I don't have much experience with report filters, but trying it didn't yield any success.

    It seems like this would be such a common use case. E.g. this workflow would be most desired

    1) Write a generic SQL query to bring in the data (say few hundred thousand rows)

    2) Use parameters that only touch python, to

    -filter the data (easily accomplishable in dataframes)

    -change the model parameters (which will change what the python is outputting)


    Then re-running would only hit the python, which would be very fast, and not have to hit SQL again, which can take > 10 min depending on how other people are hitting the DB, which makes the process of understanding the data and answers very inefficient.


    Reply Like
  • Isaac L We have had requests for adding filters to Python so hopefully we can add that in a future release.  I'll make sure we let you know if and when it becomes available.  Thanks!

    Reply Like 1
  • Thanks! I'm trying to workaround by just putting input values on a cell in a notebook, and just telling the users to change values by changing the values of the string. This should work but it's just not as seamless for the end users.

    Reply Like
Like3 Follow
  • Status Answered
  • 1 yr agoLast active
  • 4Replies
  • 787Views
  • 3 Following