dbt snowflake target doesn't seem to work - snowflake-cloud-data-platform

sorry, I'm very new to dbt, just trying to learn and cant figure out why cant I connect to snowflake. I was able to connect to postgresql database.
Here's my profiles.yml file, I think maybe user is not correct? I can't seem to figure out what is what tbh. Thank you for any help.
demo_dbt:
target: dev
outputs:
dev:
account: https://eq16839.west-europe.azure.snowflakecomputing.com
database: TEST_DB
password: myfakepassword
role: ACCOUNTADMIN
schema: TEST_SCHEMA
threads: 1
type: snowflake
user: EFLJMYO.YJ19269
warehouse: COMPUTE_WH

Remove http:// and .snowflakecomputing.com and you should be good. Neither are part of the Snowflake account name.

Related

Why can't I create a database with my main user account with PostgreSQL?

So I have PostgreSQL installed fine, and am trying to run the createdb 'test' command in the Terminal. I am on my normal user account. When trying to create the database, I am asked for a password twice, then I get the error message createdb: error: could not connect to database template1: FATAL: password authentication failed for user "sethmarks". Does this mean I entered the incorrect password or that I do not have permission to create databases under this user? I am getting confused and frustrated by this and would like to know what is going on. I am entering the password I use for the OS user I am currently logged into.
I am able to create a database when I do sudo su - postgres and then create it when I am doing it under the Postgres user, but that is not going to work with my program. Can anybody help me figure this out?
I included a picture of the terminal to show the process and what happens when attempting to create a new db. Thank you very much.
It depends on the privileges that have been granted to your user account and which privileges have been granted to PUBLIC.
You can query some privileges with psql \du meta command for the current user.
In your case you need at least to run as superuser:
grant connect on database template1 to sethmarks;
I don't exactly why password is requested twice: this is not caused by wrong password: I have the same behaviour but I need to give the database user password not the OS user password.

Why newly created database from Snowflake web console is not listing in snowsql client?

Please advice regarding below issue. I am new to Snowflake and learning and doing hands on. I created a new warehouse and database from Snowflake web-console under account admin role. I am trying to connect to SnowSQL client to stage my local files.I was able to connect successfully to SnowSQL and to new warehouse. But my new database which I created from Snowflake console is not listing in SnowSQL client. The database in console shows as accountadmin as role. So still not sure why it is not listing in SnowSQL CLI. Please advice?
Thanks,
Tanveer
Great to see you are learning Snowflake. I would suggest creating a role and then "grant role sysadmin to role yourrole. Use the same role in snowsql and you should any object created with that role. As Suzy mentioned, if the role you are using when logging into snowsql has not been granted the role of accountadmin, you will not see the tables created by accountadmin.
Thanks a lot to both of you for quick response. You both are correct. As I mentioned, in snowflake console I created the DB and tables from accountadmin role whereas in snowsql default role is sysadmin (I was unaware of this).So changed the role to sysadmin in snow sql to account admin role and it worked fine. And tried granting necessary priviliedge to sysadmin role in webconsole and that worked too. thanks a lot once again. Am closing this post.

Bugzilla could not connect to the mysql?

I am using C:\Bugzilla>checksetup.pl and it shows me this error message...plz tell me how i connect to mysql with bugzilla....
There was an error connecting to MySQL:
Access denied for user 'bugs'#'localhost' (using password: NO)
This might have several reasons:
MySQL is not running.
MySQL is running, but there is a problem either in the
server configuration or the database access rights. Read the Bugzilla
Guide in the doc directory. The section about database configuration
should help.
Your password for the 'bugs' user, specified in $db_pass, is
incorrect, in './localconfig'.
There is a subtle problem with Perl, DBI, or MySQL. Make
sure all settings in './localconfig' are correct. If all else fails, set
'$db_check' to 0.
You need to grant access to the user bugs from localhost to this database. Try the following, replacing the relevant parameters
GRANT ALL PRIVILEGES ON DATABASENAME.* To 'user'#'localhost' IDENTIFIED BY 'password';
More information about GRANT

Cannot find the user '', because it does not exist or you do not have permission

I am trying to add permissions to a Store procedure for a user using this query,
USE [MyDatabaseName]
GO
GRANT EXEC ON [dbo].[StoreProcedureName] TO [UserName]
GO
I can give permissions to user through theUser Interface but using this query I get this error,
Cannot find the user 'UserName', because it does not exist or you do not have
permission.
If I don't have permissions then how can I add permissions using User Interface.
I just encountered the same problem.
Make sure there is a user mapping for your login in the master table. No database role memberships are required, just tick 'Map' for the database master under 'User Mapping' in the properties for the login 'UserName'.
Run this:
USE [db_where_you_need_access]
GO
CREATE USER [your_user] FOR LOGIN [your_user]
I had this issue and yet I am in the local admin group on the server. Apparently if UAC is turned onrunning SQL Server Management Studio as administrator makes a world of difference. I didn't have any permissions until I did this.
You can get problems like this when a database has been restored from another server and the GUID of the user in the database is different from that of the current server.
This will re-link orphaned users:
USE <database_name>;
GO
sp_change_users_login #Action='update_one', #UserNamePattern='<database_user>',
#LoginName='<login_name>';
GO
other than this, if the user exists and you have the relevant security rights, there is no reason what you doing wouldn't work.
A bit of a daft one, but make sure your UserName is spelt correctly in the GRANT statement. I spent half an hour trying to figure out what the cause of this error was and it was simply a typo on my part!

Create a new database problem

I'm logging in to create a new database from CMD through sqlcmd with SA account. Its response is a message: CREATE DATABASE permission denied in database 'master'.
I'm using Windows server 2003 and SQL 2008. Please help me. Thanks in advance.
It doesn't sound like you're actually using the sa account, or else perhaps you haven't set up your service account properly using SQL config mgr. If you used Computer Manager | Services, then the service might not have permission to create the database files.
...Run As Administrator should do the trick.
Typically the user you're using to run the SQL Server service will not have access to certain folders, which is likely why you're getting this error.
Consider one of these alternatives:
change the credentials used for the service (ick!)
use runas /u:... or Run as...
add permission for the service to access those folders
move the database to a location that the service can access
I would check whether the user you are using indeed has CREATE DATABASE permission though. You can check what server roles it belongs to, because it seems it is not a sysadmin role.
You can use this query for example.
select suser_name(role_principal_id) [login ...],
suser_name(member_principal_id) [... belongs to]
from sys.server_role_members
Regards
Piotr

Resources