Method: Google::Cloud::Bigquery::Schema::Field#numeric
- Defined in:
- lib/google/cloud/bigquery/schema/field.rb
#numeric(name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil) ⇒ Object
Adds a numeric number field to the schema. NUMERIC is a decimal
type with fixed precision and scale. Precision is the number of
digits that the number contains. Scale is how many of these
digits appear after the decimal point. It supports:
Precision: 38 Scale: 9 Min: -9.9999999999999999999999999999999999999E+28 Max: 9.9999999999999999999999999999999999999E+28
This type can represent decimal fractions exactly, and is suitable for financial calculations.
This can only be called on fields that are of type RECORD.
696 697 698 699 700 701 702 703 704 705 706 |
# File 'lib/google/cloud/bigquery/schema/field.rb', line 696 def numeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil record_check! add_field name, :numeric, description: description, mode: mode, policy_tags: , precision: precision, scale: scale end |