App::Sqitch::Engine::snowflake - Sqitch Snowflake Engine
my $snowflake = App::Sqitch::Engine->load( engine => 'snowflake' );
App::Sqitch::Engine::snowflake provides the Snowflake storage engine for Sqitch.
uri
Returns the Snowflake database URI name. It starts with the URI for the target and builds out missing parts. Sqitch looks for the host name in this order:
In the host name of the target URI. If that host name does not end in snowflakecomputing.com, Sqitch appends it. This lets Snowflake URLs just reference the Snowflake account name or the account name and region in URLs.
snowflakecomputing.com
In the $SNOWSQL_HOST environment variable.
$SNOWSQL_HOST
By concatenating the account name and region, if available, from the $SNOWSQL_ACCOUNT environment variable or connections.accountname setting in the SnowSQL configuration file, the $SNOWSQL_REGION or connections.region setting in the SnowSQL configuration file, and snowflakecomputing.com.
$SNOWSQL_ACCOUNT
connections.accountname
$SNOWSQL_REGION
connections.region
The port defaults to 443, but uses to the $SNOWSQL_PORT environment variable if it's set. The database name can also be set via the $SNOWSQL_DATABASE environment variable. Other attributes of the URI are set from the account, username and password attributes documented below.
$SNOWSQL_PORT
$SNOWSQL_DATABASE
account
username
password
Returns the Snowflake account name, or an exception if none can be determined. Sqitch looks for the account code in this order:
In the host name of the target URI.
In the $SNOWSQL_ACCOUNT environment variable.
In the connections.accountname setting in the SnowSQL configuration file.
Returns the snowflake user name. Sqitch looks for the user name in this order:
In the $SQITCH_USERNAME environment variable.
$SQITCH_USERNAME
In the target URI.
In the $SNOWSQL_USER environment variable.
$SNOWSQL_USER
In the connections.username variable from the SnowSQL config file.
connections.username
The system username.
Returns the snowflake password. Sqitch looks for the password in this order:
In the $SQITCH_PASSWORD environment variable.
$SQITCH_PASSWORD
In the $SNOWSQL_PWD environment variable.
$SNOWSQL_PWD
In the connections.password variable from the SnowSQL config file.
connections.password
warehouse
Returns the warehouse to use for all connections. Defaults to the value of the warehouse query parameter of the target URI, the $SNOWSQL_WAREHOUSE environment variable, or else "sqitch". This value will be available to all Snowflake change scripts as the &warehouse variable.
$SNOWSQL_WAREHOUSE
&warehouse
initialized
$snowflake->initialize unless $snowflake->initialized;
Returns true if the database has been initialized for Sqitch, and false if it has not.
initialize
$snowflake->initialize;
Initializes a database for Sqitch by installing the Sqitch registry schema.
snowsql
Returns a list containing the snowsql client and options to be passed to it. Used internally when executing scripts.
David E. Wheeler <david@justatheory.com>
Copyright (c) 2012-2018 iovation Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
To install App::Sqitch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Sqitch
CPAN shell
perl -MCPAN -e shell install App::Sqitch
For more information on module installation, please visit the detailed CPAN module installation guide.