feat: Enable time substitution in spec templates#20399
Conversation
4c20d02 to
10c05d3
Compare
| tables: [test] | ||
| spec: | ||
| # Specifying non-relative time for easier testing | ||
| table_options: ${time:2025-01-01} |
There was a problem hiding this comment.
Can we use a real example for a table in the AWS plugin? So people don't get confused and think this is something that would work
There was a problem hiding this comment.
Replaced with real table_options 👍
|
I don't think this needs to be marked as a breaking change, but is rather a feature people can opt-in to use and it should not affect anything else otherwise. Am I wrong? |
There is rather small chance that someone named their env variable ${time:} so if you think it's allright to push it as minor then let's do it :D |
|
@przste-go while permitted by some implementations, they are not allowed or supported by the RFC. https://pubs.opengroup.org/onlinepubs/9799919799/
I don't think it's worth creating this as a breaking change for something that
Realistically, I tried to create these ENV's and I was not able to. |
|
sounds fair |
erezrokah
left a comment
There was a problem hiding this comment.
Looks good, made the changelog a bit more descriptive via a commit override and a link to our docs (to be created)
🤖 I have created a release *beep* *boop* --- ## [6.17.0](cli-v6.16.0...cli-v6.17.0) (2025-03-24) ### Features * Enable time substitution in spec templates ([#20399](#20399)). See our [docs](https://docs.cloudquery.io/docs/advanced-topics/environment-variable-substitution#time-variable-substitution-example) for more information. ([b46842d](b46842d)) ### Bug Fixes * **deps:** Update module github.com/apache/arrow-go/v18 to v18.2.0 ([#20410](#20410)) ([ee081fb](ee081fb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
|
I love this change! How might I create a relative date of format |
|
Hi @akash1810 we have that feature planned for current development cycle, so it should be publicly available in upcoming weeks 🚀 |
#### Summary⚠️ **If you're contributing to a plugin please read this section of the [contribution guidelines](https://github.com/cloudquery/cloudquery/blob/main/CONTRIBUTING.md#open-core-vs-open-source) 🧑🎓 before submitting this PR**⚠️ This PR follows changes introduced in #20399. In enables formatting substituted times using '|' operator according to golang time layout spec https://go.dev/src/time/format.go.
Summary
This PR aims to enable relative time support in all spec templates used is CQ platform without additional type overriding on plugin side. I.e following aws table options can be automatically substituted using yaml parser.
BEGIN_COMMIT_OVERRIDE
feat: Enable time substitution in spec templates (#20399). See our docs for more information.
END_COMMIT_OVERRIDE