Git Product home page Git Product logo

Comments (5)

dichenli avatar dichenli commented on August 24, 2024

Thank you for using AWS Glue.

If the tables are missing, did the script create any database in your Glue Data Catalog? You may find the list of databases on Glue console.

Another way to check if the tables are showing up is to use AWS CLI to call Glue service directly. For example, you could try the following shell commands:

$ aws glue get-database --name myHiveMetastore_default
$ aws glue get-table --database-name myHiveMetastore_default --name myHiveMetastore_customers

for instructions to install or update AWS CLI, you may refer to http://docs.aws.amazon.com/cli/latest/userguide/installing.html

The script hive_metastore_migration.py is completely open-source Spark code, so you could directly test and debug the script using Spark local mode. But the script import_into_datacatalog.py include Glue specific library, so you need to run it from a Glue job. You could modify the script to add print line statements to see the job output though.

If you have further questions, you can also use the AWS Glue Forum: https://forums.aws.amazon.com/forum.jspa?forumID=262.

from aws-glue-samples.

addictedanshul avatar addictedanshul commented on August 24, 2024

Thanks dichenli for prompt response.
So firstly, yes database is also missing. In my previous post, I had attached database and tables files generated by 2nd approach and exported metastore to S3.
Both these things are not visible in Glue catalog after running direct from Hive to Glue.

I ran hive_metastore_migration.py and it is working fine because it created files in S3 using 2nd approach (attached in previous post).
It is import_into_datacatalog.py which is not working and problem is that no error is there. Job succeeds with no error logs but tables and databases are not seen. I have not edited a single char. in the script.
Yes I would be trying now with exhaustive print statements now.

from aws-glue-samples.

dichenli avatar dichenli commented on August 24, 2024

I tried to run the migration job from S3 to Glue, with the databases and tables files you provided. It succeeded and the databases and tables correctly show up in my Glue console. Could you check if your job configuration is the same as mine?

Script Path: s3://someBucket/import_into_datacatalog.py
Temporary directory: s3://someBucket
Required connections: empty (for migration from S3)
Python library path: s3://someBucket/hive_metastore_migration.py
Job parameters:
-m: from-s3
-D: s3://someBucket/output_from_previous_job/databases
-T: s3://someBucket/output_from_previous_job/tables
-P: s3://someBucket/output_from_previous_job/partitions

Notice the -m, -D, -T and -P are short names for --mode, --database-input-path, --table-input-path, --partition-input-path, you could use either.

I manually created the s3://someBucket/output_from_previous_job/databases, tables and partitions folders, and uploaded databases.txt and tables.txt files to the respective folders. partitions folder is empty.

from aws-glue-samples.

dichenli avatar dichenli commented on August 24, 2024

Hi Anshul,
I'll close the issue. If you are still blocked on the same problem, please feel free to reopen it. If you have any new questions, you may open a new issue, or post on AWS Glue forum https://forums.aws.amazon.com/forum.jspa?forumID=262. Thank you!

from aws-glue-samples.

kjudahlookout avatar kjudahlookout commented on August 24, 2024

Hello Anshul and Dichen,
I am having the same issue when I use the scripts to directly migrate from hive metastore to glue data catalog. The job runs successfully in Glue but I don't see anything migrated to Glue data catalog. I am wondering if you guys were able to resolve this issue. Help on this issue is very appreciated.

Thanks,
Kshitij

from aws-glue-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.