Skip to content

SNOW-1926956: Attribute to map DDL queried from Snowflake #1099

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

Closed
nh-tu-z opened this issue Feb 13, 2025 · 2 comments
Closed

SNOW-1926956: Attribute to map DDL queried from Snowflake #1099

nh-tu-z opened this issue Feb 13, 2025 · 2 comments
Assignees
Labels
status-triage_done Initial triage done, will be further handled by the driver team

Comments

@nh-tu-z
Copy link

nh-tu-z commented Feb 13, 2025

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of .NET driver are you using?
    4.3.0

  2. What operating system and processor architecture are you using?
    Windows 11 Pro | 64-bit operating system, x64-based processor

  3. What version of .NET framework are you using?
    .NET 8.0

  4. What did you do?

    I have queried the snowpark container endpoint to use in my application. I got the information successfully. However, it can not be mapped to class property.

public async Task<SnowparkServiceProperties> GetSnowparkServiceProperties(IDbConnection connection)
{
    return await connection.QuerySingleAsync<SnowparkServiceProperties>("SHOW ENDPOINTS IN SERVICE \"MY_SERVICE\"");
}
public class SnowparkServiceProperties
{
    [Column("ingress_url")]
    public string IngressUrl { get; set; } = string.Empty;
}

In somewhere, I try to get it:

var snowparkData = await _systemRepository.GetSnowparkServiceProperties(connection);

And I came up with snowparkData.IngressUrl = "" (empty) when trying to debug it.

  1. What did you expect to see?

    What should have happened and what happened instead?

With the steps mentioned above, I expect to have the ingress url in snowparkData.IngressUrl instead of empty. However, when I create the class like

public class SnowparkServiceProperties
{
    public string ingress_url { get; set; } = string.Empty;
}

it can totally get the result as I expected.

I am thinking that [Column("ingress_url")] attribute is not working in this case.

So what I am expecting is an attribute to map class property to the snowflake metadata (ingress_url to IngressUrl). Do we have an attribute to solve this problem?

For further information, I have successfully mapped sql query data from snowflake using Column attribute. But in case of DDL, I can't do that.

  1. Can you set logging to DEBUG and collect the logs?

    https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors

    There is an example in READMD.md file showing you how to enable logging.

    Before sharing any information, please be sure to review the log and remove any sensitive
    information.

@nh-tu-z nh-tu-z added the bug label Feb 13, 2025
@github-actions github-actions bot changed the title Attribute to map DDL queried from Snowflake SNOW-1926956: Attribute to map DDL queried from Snowflake Feb 13, 2025
@sfc-gh-dszmolka
Copy link
Contributor

hello - i tried to reproduce this issue but upon sending SHOW ENDPOINTS IN SERVICE <myservice> , the following columns come back:

"name", "port", "port_range", "protocol", "is_public", "ingress_url", "privatelink_ingress_url"

similarly to any select with its corresponding columns.
Can you retrieve any other columns from the SHOW command above; only have problems with ingress_url ?

What is the output if you list out the columns ?
What is QuerySingleAsync doing ?

@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Mar 12, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage Issue is under initial triage status-information_needed Additional information is required from the reporter and removed bug labels Mar 12, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-pending_closure If no further assistance is needed, let's close the issue out. label Mar 19, 2025
@sfc-gh-dszmolka
Copy link
Contributor

closing this issue as its been inactive for a while now

@sfc-gh-dszmolka sfc-gh-dszmolka closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed status-triage Issue is under initial triage status-information_needed Additional information is required from the reporter status-pending_closure If no further assistance is needed, let's close the issue out. labels Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants