Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for query tags from profiles.yml and environment variables #21

Merged
merged 6 commits into from
Jan 18, 2024

Conversation

alex-mirkin
Copy link
Contributor

@alex-mirkin alex-mirkin commented Jan 14, 2024

Currently, if I want to extend the query tags, only the ones from the model's config are added.
If I have a query tag in my connection profile in the profiles.yml file - they are ignored.

I've added the support to fetch the query tag from profiles.yml file as well as from environment variables.

The list of the environment variables to get the tags from is defined by a new project variable: env_vars_to_query_tag_list.

@alex-mirkin alex-mirkin had a problem deploying to Approve Integration Tests January 14, 2024 18:45 — with GitHub Actions Failure
Copy link
Contributor

@ian-whitestone ian-whitestone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening the PR @maddoc1!

Will let @NiallRees own the review.

Functionality wise seems like two helpful additions. My only concern is i'm not quite sure what the implications are of starting out by populating the query tag from the current values set in the session - will let Niall comment here.

README.md Outdated Show resolved Hide resolved
@@ -11,6 +32,8 @@
{% set query_tag = {} %} {# If the user has set the query tag config as a non mapping type, start fresh #}
{% endif %}

{% do query_tag.update(session_query_tag_json) %}
{% do query_tag.update(env_var_query_tags) %}

{%- do query_tag.update(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NiallRees will defer this review to you

@alex-mirkin alex-mirkin had a problem deploying to Approve Integration Tests January 14, 2024 18:57 — with GitHub Actions Failure
Co-authored-by: Ian Whitestone <[email protected]>
@alex-mirkin alex-mirkin had a problem deploying to Approve Integration Tests January 14, 2024 19:05 — with GitHub Actions Failure
@@ -3,6 +3,27 @@
{%- endmacro %}

{% macro default__set_query_tag() -%}
{# Get session level query tag #}
{% set session_query_tag = get_current_query_tag() %}
{% set session_query_tag_json = {} %}
Copy link
Member

@NiallRees NiallRees Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% set session_query_tag_json = {} %}
{% set session_query_tag_json = {} %}

let's rename this to 'session_query_tag_parsed' because it's not json once it's been fromjson'd?

@NiallRees NiallRees had a problem deploying to Approve Integration Tests January 18, 2024 11:24 — with GitHub Actions Failure
@NiallRees NiallRees had a problem deploying to Approve Integration Tests January 18, 2024 11:27 — with GitHub Actions Failure
@NiallRees NiallRees merged commit 56ecce4 into get-select:main Jan 18, 2024
1 check failed
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.

3 participants