mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-17 13:45:54 +00:00
fix(ingest): bigquery - missing sqlalchemy dep and row count fix (#6553)
This commit is contained in:
parent
7a8e36d57d
commit
d424edde41
@ -252,12 +252,13 @@ plugins: Dict[str, Set[str]] = {
|
||||
| bigquery_common
|
||||
| {"sqlalchemy-bigquery>=1.4.1", "sqllineage==1.3.6", "sqlparse"},
|
||||
"bigquery-usage-legacy": bigquery_common | usage_common | {"cachetools"},
|
||||
"bigquery": sql_common | bigquery_common | {"sqllineage==1.3.6", "sql_metadata"},
|
||||
"bigquery": sql_common | bigquery_common | {"sqllineage==1.3.6", "sql_metadata", "sqlalchemy-bigquery>=1.4.1"},
|
||||
"bigquery-beta": sql_common
|
||||
| bigquery_common
|
||||
| {
|
||||
"sqllineage==1.3.6",
|
||||
"sql_metadata",
|
||||
"sqlalchemy-bigquery>=1.4.1"
|
||||
}, # deprecated, but keeping the extra for backwards compatibility
|
||||
"clickhouse": sql_common | clickhouse_common,
|
||||
"clickhouse-usage": sql_common | usage_common | clickhouse_common,
|
||||
@ -376,7 +377,8 @@ mypy_stubs = {
|
||||
"types-ujson>=5.2.0",
|
||||
"types-termcolor>=1.0.0",
|
||||
"types-Deprecated",
|
||||
"types-protobuf",
|
||||
# Mypy complains with 4.21.0.0 => error: Library stubs not installed for "google.protobuf.descriptor"
|
||||
"types-protobuf<4.21.0.0",
|
||||
}
|
||||
|
||||
base_dev_requirements = {
|
||||
|
@ -349,8 +349,8 @@ class BigQueryDataDictionary:
|
||||
)
|
||||
if "last_altered" in table
|
||||
else None,
|
||||
size_in_bytes=table.bytes if "bytes" in table else None,
|
||||
rows_count=table.row_count if "row_count" in table else None,
|
||||
size_in_bytes=table.get("bytes"),
|
||||
rows_count=table.get("row_count"),
|
||||
comment=table.comment,
|
||||
ddl=table.ddl,
|
||||
expires=tables[table.table_name].expires if tables else None,
|
||||
@ -361,24 +361,16 @@ class BigQueryDataDictionary:
|
||||
clustering_fields=tables[table.table_name].clustering_fields
|
||||
if tables
|
||||
else None,
|
||||
max_partition_id=table.max_partition_id
|
||||
if "max_partition_id" in table
|
||||
else None,
|
||||
max_partition_id=table.get("max_partition_id"),
|
||||
max_shard_id=BigqueryTableIdentifier.get_table_and_shard(
|
||||
table.table_name
|
||||
)[1]
|
||||
if len(BigqueryTableIdentifier.get_table_and_shard(table.table_name))
|
||||
== 2
|
||||
else None,
|
||||
num_partitions=table.num_partitions
|
||||
if "num_partitions" in table
|
||||
else None,
|
||||
active_billable_bytes=table.active_billable_bytes
|
||||
if "active_billable_bytes" in table
|
||||
else None,
|
||||
long_term_billable_bytes=table.long_term_billable_bytes
|
||||
if "long_term_billable_bytes" in table
|
||||
else None,
|
||||
num_partitions=table.get("num_partitions"),
|
||||
active_billable_bytes=table.get("active_billable_bytes"),
|
||||
long_term_billable_bytes=table.get("long_term_billable_bytes"),
|
||||
)
|
||||
for table in cur
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user