Skip to content

Ibis Oracle backend column types #7358

Answered by gforsyth
rd5802 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @rd5802!

If you want fine-grained control over DDL, you are probably better off using raw_sql to create your tables. Something like:

In [10]: cursor = con.raw_sql("""CREATE TABLE "new_table" ("foo" 
    ...: VARCHAR2(255), "year" NUMBER(18,2), "month" NUMBER(18,2)
    ...: )""")

In [11]: cursor.close()

In [12]: con.list_tables()
Out[12]: ['new_table']

In [13]: t = con.tables.new_table

In [14]: t
Out[14]: 
DatabaseTable: new_table
  foo   string
  year  decimal(18, 2)
  month decimal(18, 2)

Ibis will treat all of Oracle's many stringy times as a string, but the specific type of string in the underlying table schema will be preserved.

Also note that you have to manage the cursor gen…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cpcloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants