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

SNOW-1858362: Cannot perform runtime binding on a null reference when using PUT command for a single csv file #1073

Open
bianca01276 opened this issue Dec 16, 2024 · 1 comment
Assignees
Labels
status-information_needed Additional information is required from the reporter status-triage Issue is under initial triage

Comments

@bianca01276
Copy link

bianca01276 commented Dec 16, 2024

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.2.0 but I tried with 4.1.0 and there is the same issue

  2. What operating system and processor architecture are you using?
    Windows

  3. What version of .NET framework are you using?
    .net 8

  4. What did you do?
    I have a csv file and I want to add it in a stage with put command. I opened the connection
    cmd.CommandText = $"PUT file://monthly.csv @import.file AUTO_COMPRESS=TRUE SOURCE_COMPRESSION=GZIP PARALLEL=3";

  5. What did you expect to see?
    The command executed successfully
    I receive this error Snowflake.Data.Client.SnowflakeDbException: 'Error: IO operation failed. Error: One or more errors occurred. (Cannot perform runtime binding on a null reference) SqlState: , VendorCode: 270058, QueryId: 01b91049-0305-2703-0000-3402747595e3'

This error appears here:
error

most probably the issue is due to the fact that the fields are checked in Uppercase but in val they appear in lowercase...

  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.

@github-actions github-actions bot changed the title Cannot perform runtime binding on a null reference when using PUT command for a single csv file SNOW-1858362: Cannot perform runtime binding on a null reference when using PUT command for a single csv file Dec 16, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Dec 16, 2024
@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 Dec 16, 2024
@sfc-gh-dszmolka
Copy link
Contributor

hi - thanks for filing this issue with us. what is @import.file here ? is it supposed to be database.schema ? If yes, then Stage name is missing.
can you please try:

  1. either specifying db and schema in connection string, then only use Stage name with PUT file://<path to file> @mystage ..rest of the params
  2. or, using Stage FQDN like PUT file://<path to file> @mydb.myschema.mystage ...rest of the params
  3. to rule out driver related issues, you can try any other Snowflake client driver using the exact same syntax and see if it works

let me know please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status-information_needed Additional information is required from the reporter status-triage Issue is under initial triage
Projects
None yet
Development

No branches or pull requests

2 participants