I've created a Redshift cluster using the AWS management console. The cool thing that AWS setup was this query editor to be able to write queries directly on your cluster without having to install a SQL client on your computer.
However, I was trying to create a new database on the instance but it doesn't seem to be possible using AWS query editor. Am I right or did I miss something?
I indeed missed something, you simply need to go into your query editor and write
CREATE DATABASE db_name OWNER=db_owner;
Related
i have created a database in Redshift cluster now i want see the database and its tables manually instead of querying it.
Where can i see those database
create database example1;
With Redshift, there is no way to look at the data in any way except by issuing queries and commands against it. This is fairly common for most DBMS products.
AWS "recommend" the free tool Sqlworkbench/J
https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-using-workbench.html
In addition you can issue commands against Redshift using the AWS management console
https://docs.aws.amazon.com/redshift/latest/mgmt/query-editor.html
My personal favorite (as a professional developer) is to use the Jetbrains DataGrip product.
I am quiet new to AWS and trying to learn things. I currently have a live production environment and trying to create a test environment. I was able to create an image of an ec2 instance in AWS using the 'Create Image' option in the 'Actions'. Now I am trying to create an image/ duplicate of the RDS Database in AWS in a similar way. Is there any easy way to clone the database so that I don't change any data in the original database and perform modifications only in the test database. Thanks for all your help.
Probably worth reading up on creating snapshots and restoring from a snapshot.
To give you a quick summary; you will take a snapshot of your production RDS DB instance. Then you will launch a new DB instance from this snapshot.
As long as you don't need to launch the new instance in a separate AWS Account, the documentation should tell you all you need to know.
I'm trying to run a hive job using Glue metadata. From the aws docs
Under AWS Glue Data Catalog settings select Use for Hive table
metadata.
I created a cluster that apparently connects to the default database from glue (i can tell by running show tables; from hive, which lists a table from defaultdatabase.
Now does anyone know how to provide an option to connect to another database from glue ? The only thing I could find in the docs is the opportunity of providing a hive.metastore.glue.catalogid where you can provide a catalog from another account, but I cannot find anything in the docs about using the right database.
Or perhaps all the databases are loaded. If so, do you know how to access them within hive ?
Ok, it turns out all the databases are loaded in hive. You can simply access them by using select * from my_database_name.my_table_name, or by setting the database name once with use my_database_name
I created the RDS instance in AWS console, and I created the table and load the SQL script. Am I able to see the table and data for this RDS instance in AWS console?
No, you cannot see the RDS data (tables, rows, etc.) in the AWS Management Console.
To see the data, you'll need the appropriate client depending on the RDS engine type. Some examples:
MySQL: MySQL Workbench
SQL Server: SQL Server Management Studio
PostgreSQL: pgAdmin
Oracle: Oracle SQL Developer
It's possible to achieve, you can use AWS Glue - https://aws.amazon.com/blogs/big-data/how-to-access-and-analyze-on-premises-data-stores-using-aws-glue/
You can actually achieve this using the RDS query editor.
Type this command:
select * from information_schema.tables;
You will have to visually search for your tables here. Look through the "table_name" column until you can identify them. Every time I've used this command, the database tables I created were either listed first or very last. It's not a perfect way to do it, but it will usually suffice, and you don't need any extra services or software to achieve it.
You can use the QueryEditor to list the tables you've created using this SQL:
select * from information_schema.tables where TABLE_SCHEMA = 'name of your database goes here';
I created an AWS RDS MSSQL instance using Management Console but I cannot create a new database. Creating a table works fine though.
Did I miss anything in the configuration? Do I need to execute a special schema?
According to the documentation, you can create up to 30 databases per RDS instances.
http://aws.amazon.com/rds/faqs/#2
We would need more details to debug your particular issue. (Parameters used to create the RDS instance, exact error message etc )