Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8632851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:24:30+00:00 2026-06-12T09:24:30+00:00

I should extract data from an oracle database. How can I find out which

  • 0

I should extract data from an oracle database.
How can I find out which schema are defined in the database?
When I do not define any schema in the description of Metadata(), I find no tables.
thanks for your help,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:24:30+00:00Added an answer on June 12, 2026 at 9:24 am

    Default Oracle schema matches the username that was used in Oracle connection.
    If you don’t see any tables – it means the tables are created in another schema.

    Looks like you have two questions here:

    1) about Oracle schemas – how to find schema and tables in Oracle

    2) about SQLAlchemy reflections – how to specify Oracle schema for table

    You can find answer for the first question in many places. I.e. here: https://stackoverflow.com/a/2247758/1296661

    Answering second question:
    Table class constructor has schema argument to specify table’s schema if it is different from default user’s schema. See more here
    http://docs.sqlalchemy.org/en/rel_0_7/core/schema.html#sqlalchemy.schema.Table

    Here is the python code to answer second question. You will need to setup db connection and table name values to match your case:

    from sqlalchemy import Table
    from sqlalchemy.ext.declarative import declarative_base
    
    
    from sqlalchemy import create_engine
    engine = create_engine('oracle://<user_name>:<password>@<hostname>:1521/<instance name>', echo=True)
    Base = declarative_base()
    
    reflected_table = Table('<Table name>', 
        Base.metadata, 
        autoload=True, 
        autoload_with=engine, 
        schema='<Schema name other then user_name>')
    print [c.name for c in reflected_table.columns]
    
    p = engine.execute("SELECT OWNER,count(*) table_count FROM ALL_OBJECTS WHERE OBJECT_TYPE = 'TABLE' GROUP BY OWNER");
    
    for r in p:
        print r
    

    Good luck with using sqlschema and reflection feature – it is a lot of fun. You get your python program working with existing database almost without defining schema information in your program.

    I’m using this feature with oracle db in production – the only thing I have to define were relations between tables explicitly setting foreign and primary keys.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I extract data from a MySQL database, some of the output have special
We are working on custom ETL tool. We extract data from database in files,
I have a function in codeigniter which takes data extracted from the database, checks
I have an Excel file from which I have to extract the required data
I am trying to figure out a better way to extract data from a
I am trying to extract EXIF data from a image(jpeg) which has been dragged
I'm trying to extract data from a many to many table configuration. I'm sorry
I'm trying to extract/match data from a string using regular expression but I don't
I'm trying to extract data from an xml file. A sample of my code
I am familier with java programming language I like to extract the data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.