bcgov / bcgov/bcdata_py

bc2pg - improve type mapping

オープン
#204 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
32
フォーク
7
平均マージ
12分
マージ済み PR(30日)
14

説明

As per #178, `bc2pg` creates `numeric` postgres columns for BCDC `NUMBER` columns.

Should `bcdata` :

- automatically inspect the data to determine if it is integer and adjust the type accordingly?
- accept an optional field map argument for overriding the BCDC types, maybe something like `{"field_name1": "numeric", "field_name2": "integer"}`?
- parse the `data_precision` part of the schema?

As data are read by geopandas when writing to postgres:

- if providing a mapping, easiest would be to use sqlalchemy types: https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.to_postgis.html
- if running the type optimization automatically, pandas has a method: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.convert_dtypes.html

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。