Class: Polars::Catalog::Unity::TableInfo
- Inherits:
-
Struct
- Object
- Struct
- Polars::Catalog::Unity::TableInfo
- Defined in:
- lib/polars/catalog/unity/table_info.rb,
lib/polars/catalog/unity/table_info.rb
Overview
Information for a catalog table.
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#created_by ⇒ Object
Returns the value of attribute created_by.
-
#data_source_format ⇒ Object
Returns the value of attribute data_source_format.
-
#name ⇒ Object
Returns the value of attribute name.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#storage_location ⇒ Object
Returns the value of attribute storage_location.
-
#table_id ⇒ Object
Returns the value of attribute table_id.
-
#table_type ⇒ Object
Returns the value of attribute table_type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#updated_by ⇒ Object
Returns the value of attribute updated_by.
Instance Method Summary collapse
-
#get_polars_schema ⇒ Schema
Get the native polars schema of this table.
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def columns @columns end |
#comment ⇒ Object
Returns the value of attribute comment
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def comment @comment end |
#created_at ⇒ Object
Returns the value of attribute created_at
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def created_at @created_at end |
#created_by ⇒ Object
Returns the value of attribute created_by
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def created_by @created_by end |
#data_source_format ⇒ Object
Returns the value of attribute data_source_format
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def data_source_format @data_source_format end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def name @name end |
#properties ⇒ Object
Returns the value of attribute properties
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def properties @properties end |
#storage_location ⇒ Object
Returns the value of attribute storage_location
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def storage_location @storage_location end |
#table_id ⇒ Object
Returns the value of attribute table_id
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def table_id @table_id end |
#table_type ⇒ Object
Returns the value of attribute table_type
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def table_type @table_type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def updated_at @updated_at end |
#updated_by ⇒ Object
Returns the value of attribute updated_by
5 6 7 |
# File 'lib/polars/catalog/unity/table_info.rb', line 5 def updated_by @updated_by end |
Instance Method Details
#get_polars_schema ⇒ Schema
This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.
Get the native polars schema of this table.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/polars/catalog/unity/table_info.rb', line 30 def get_polars_schema if columns.nil? return nil end schema = Schema.new(check_dtypes: false) columns.each do |column_info| if schema[column_info.name] msg = "duplicate column name: #{column_info.name}" raise DuplicateError, msg end schema[column_info.name] = column_info.get_polars_dtype end schema end |