在 odbc 和 snowsql 中设置数据库大小?

Set database size in odbc and snowsql?

我通过 odbc 和 snowsql 连接到雪花。无论出于何种原因,当通过 odbc 查询并在历史选项卡中查看 运行ning 查询时,大小设置为大。通过 SnowSQL 查询时,大小设置为较小。

我搜索了 odbc 和 snowsql 配置,但无法判断这是我在 UI 中设置的还是通过任一客户端中的连接设置设置的。

我可以通过 odbc 或 SnowSQL 的连接设置来设置大小吗?如果是,如何?

例如我当前经过清理的连接设置:

雪数据库: 配置文件:

[connections]
authenticator = SNOWFLAKE_JWT
private_key_path = /root/.snowsql/rsa_key.p8

[variables]
#Loads these variables on startup
#Can be used in SnowSql as select $example_variable

example_variable=27

[options]
# If set to false auto-completion will not occur interactive mode.
auto_completion = True

# going to use start and end date variables from environment in the sql script
variable_substitution = True

# main log file location. The file includes the log from SnowSQL main
# executable.
log_file = /root/.snowsql/snowsql_rt.log

# bootstrap log file location. The file includes the log from SnowSQL bootstrap
# executable.
log_bootstrap_file = /root/.snowsql/log_bootstrap

# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO"
# and "DEBUG".
log_level = DEBUG

# Timing of sql statments and table rendering.
timing = True

# Table format. Possible values: psql, plain, simple, grid, fancy_grid, pipe,
# orgtbl, rst, mediawiki, html, latex, latex_booktabs, tsv.
# Recommended: psql, fancy_grid and grid.
output_format = psql

# Keybindings: Possible values: emacs, vi.
# Emacs mode: Ctrl-A is home, Ctrl-E is end. All emacs keybindings are available in the REPL.
# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL.
key_bindings = emacs

# OCSP Fail Open Mode.
# The only OCSP scenario which will lead to connection failure would be OCSP response with a
# revoked status. Any other errors or in the OCSP module will not raise an error.
# ocsp_fail_open = True

# Enable temporary credential file for Linux users
# For Linux users, since there are no OS-key-store, an unsecure temporary credential for SSO can be enabled by this option. The default value for this option is False.
# client_store_temporary_credential = True

# Repository Base URL
# The endpoint to download the SnowSQL main module.
repository_base_url = https://sfc-repo.snowflakecomputing.com/snowsql

我在连接以下内容时使用此配置:

snowsql -f ${INPUT_QUERY_FILE} \
  -o quiet=true \
  -o friendly=false \
  -o header=true \
  -o output_format=csv \
  -o output_file=output_data/data.csv \
  --accountname=${INPUT_ACCOUNT_NAME} \
  --username=${INPUT_USER_NAME} \
  --dbname=${INPUT_DBNAME} \
  --private-key-path=/root/.snowsql/rsa_key.p8 \
  --config /config

这 运行 符合预期,returns 是查询结果。但它在查询 Snowflake 时使用了一个小设置。有没有办法调整这个,例如大?

对于 odbc:

[snowflake]
Description=SnowflakeDB
Driver=SnowflakeDSIIDriver
Locale=en-US
SERVER=<ourorg>.us-east-1.snowflakecomputing.com
PORT=443
SSL=on
ACCOUNT=<ourorg>.us-east-1
# change to your snowflake user_name
UID=MY_NAME
# change to /home/<your-home>/keys/rsa_key.p8
PRIV_KEY_FILE=/home/my_name/keys/rsa_key.p8
# change "blahblah' to the passphrase you set for your private key in step 1.c
PRIV_KEY_FILE_PWD=blahblah
AUTHENTICATOR=SNOWFLAKE_JWT

然后我连接 (R)

sfconn <- DBI::dbConnect(odbc::odbc(), dsn = 'snowflake', warehouse = 'DATA_SCIENCE_WH_L', 
                         database = 'ourorg', role='DATA_SCIENCE_FULL')

连接正常,我可以使用 odbc 客户端查询 Snowflake。查询是 运行,设置为 'large'。可以调整吗?

'size'是指虚拟仓库大小吗?您是在通过 SnowSQL 连接时指定仓库还是默认指定一个较小的仓库?我在 ODBC 行上看到您使用的仓库名称为 DATA_SCIENCE_WH_L,而您没有在 SnowSQL 连接字符串上列出仓库(或角色)。