Basic transformer plugin: rename_column

Hi team,

I have a request for the basic plugin: I need to rename a column while syncing the data and the transformers are a great way to do it!

My use case is that I’d like the id provided by some tables to be called external_id as I want to use my own when exposing the data to some consumers throught an API.

I’ve added the feature into the basic transformer plugin: feat: add rename_column to basic transformer plugin by jeromewir · Pull Request #1 · jeromewir/cloudquery · GitHub but didn’t open the PR on the main cloudquery plugin as it’s stated in the PR template to not open PRs for code under /plugins folder and check with the team.

Would you like me to submit the PR to the repo? If so, I can change the target for my PR to the main repo.
If not, could you consider adding the feature into the basic plugin?

Thanks!

Hi @jeromewir, thanks, this is great! It makes sense, and if you want to open a pull request to the main CloudQuery repo that would be great, we can discuss it further there.

I think we may want to design it to handle a few more cases, like renaming the same column for multiple tables, and not erroring out if the source column doesn’t exist in this case. But on the other hand, maybe that can wait until there is a clear use case for it. I’ll also ask the CQ team for their thoughts.

2 Likes

Thanks for the PR @jeromewir we released a new version of the basic transformer with the changes Basic Plugin documentation | CloudQuery (v1.4.0)

1 Like