Skip to content

feat: Add variableResolver to separate the namespaces.#329

Merged
stephenamar-db merged 1 commit intodatabricks:masterfrom
He-Pin:variableResolver
Apr 28, 2025
Merged

feat: Add variableResolver to separate the namespaces.#329
stephenamar-db merged 1 commit intodatabricks:masterfrom
He-Pin:variableResolver

Conversation

@He-Pin
Copy link
Copy Markdown
Contributor

@He-Pin He-Pin commented Apr 27, 2025

Motivation:
Instead of adding methods to std, adding them to a separate namespace seems better and safer.

local input = {
                  "name": "Alice",
                  "welcome": "Hello Alice!"
              };

tb.objectReplaceKey(input,"name", "newName")

Here we bind the objectReplaceKey function to tb, and then get the right result.

{"newName":"Alice","welcome":"Hello Alice!"}

@He-Pin He-Pin force-pushed the variableResolver branch from 79d4450 to f4c1d57 Compare April 27, 2025 13:51
@stephenamar-db stephenamar-db merged commit 8405ea4 into databricks:master Apr 28, 2025
6 checks passed
@He-Pin He-Pin deleted the variableResolver branch April 28, 2025 00:55
He-Pin added a commit to He-Pin/sjsonnet that referenced this pull request Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants