For new ones there are a couple of ways.
If you set up your folders correctly you can run this command to automatically add partitions to all folders.
However, this would need to be scheduled in some sort of way.
I would suggest using partition projects to automatically add new partitions.
Next, for your question of passing to a query, you can do that now! But only with direct query. This is in the edit dataset section.
Other options are setting filters on your dashboard / analysis to be rolling / static.