Add yaml_to_json transformer to basic transformer plugin#22454
Draft
Copilot wants to merge 2 commits into
Draft
Conversation
Adds a new transformation kind that converts string columns containing YAML content into JSON-typed columns. This is useful for converting YAML file content (e.g., from git_files table) to JSON format to enable JSON-based querying in destinations. Agent-Logs-Url: https://github.com/cloudquery/cloudquery/sessions/18f43047-fe5a-4bac-b632-d392287ee2d3 Co-authored-by: murarustefaan <15239186+murarustefaan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add transformer to convert string-like field from yaml to json
Add yaml_to_json transformer to basic transformer plugin
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
yaml_to_jsontransformation kind that converts string columns containing YAML into JSON-typed columns. Primary use case: converting thecontentfield from the git source plugin'sgit_filestable to enable JSON-based querying at the destination.Changes
spec.go— NewKindYAMLToJSONconstant with validation (requirescolumns, rejectsname/value/new_table_name_template)schema_updater.go—ChangeColumnTypes()method to retype columns in Arrow schemasrecord_updater.go—YAMLToJSON()method: parses YAML string values viaghodss/yaml, emits JSON-typed Arrow arraystransformers.go— Wires up the new kind inNewFromSpec()go.mod— Promotesghodss/yamlfrom indirect to direct dependency (no new deps added)Example config
Non-YAML-parseable values will error rather than silently pass through. Null values are preserved as null.