shinichi-takii / ddlparse

DDL parase and Convert to BigQuery JSON schema and DDL statements
https://pypi.org/project/ddlparse/
BSD 3-Clause "New" or "Revised" License
87 stars 29 forks source link

Add supports to BigQuery NUMERIC data type #47

Closed shinichi-takii closed 4 years ago

shinichi-takii commented 4 years ago

Added

Data-type Conditions

BigQuery Data Type Source Data Type Precision Scale Database Exapmle Source Data Type
INT64 (NUMERIC|NUMBER|DECIMAL) < 19 = 0 - NUMERIC(18)
FLOAT64 (NUMERIC|NUMBER|DECIMAL) < 19 > 0 - NUMERIC(18, 1)
NUMERIC (NUMERIC|NUMBER|DECIMAL) >= 19 - - NUMERIC(19)
NUMERIC (NUMERIC|NUMBER|DECIMAL) * - - NUMBER(*, 0)
INT64 (NUMERIC|NUMBER|DECIMAL) None - default DECIMAL
NUMERIC (NUMERIC|NUMBER|DECIMAL) None - DdlParse.DATABASE.oracle
DdlParse.DATABASE.postgresql
NUMBER
NUMERIC

Fixed

Applicable Issues

codecov[bot] commented 4 years ago

Codecov Report

Merging #47 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #47   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         279    285    +6     
=====================================
+ Hits          279    285    +6
Impacted Files Coverage Δ
ddlparse/ddlparse.py 100% <100%> (ø) :arrow_up:
ddlparse/__init__.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3cb19ff...9a3a7f9. Read the comment docs.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9a3a7f9cf524c3acbe4642c8a0383ca827171fab on feature/fix-number-type into 3cb19ffe9ab93e9d8298be6ed425fa535b4d324d on master.