-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
* Implement TestDocsGenerateBigQuery test * Remove legacy docs_generate tests * Add -vv to get info on failing test
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
from dbt.tests.util import AnyString, AnyFloat | ||
|
||
|
||
def bigquery_stats(is_table, partition=None, cluster=None): | ||
stats = {} | ||
|
||
if is_table: | ||
stats.update( | ||
{ | ||
"num_bytes": { | ||
"id": "num_bytes", | ||
"label": AnyString(), | ||
"value": AnyFloat(), | ||
"description": AnyString(), | ||
"include": True, | ||
}, | ||
"num_rows": { | ||
"id": "num_rows", | ||
"label": AnyString(), | ||
"value": AnyFloat(), | ||
"description": AnyString(), | ||
"include": True, | ||
}, | ||
} | ||
) | ||
|
||
if partition is not None: | ||
stats.update( | ||
{ | ||
"partitioning_type": { | ||
"id": "partitioning_type", | ||
"label": AnyString(), | ||
"value": partition, | ||
"description": AnyString(), | ||
"include": True, | ||
} | ||
} | ||
) | ||
|
||
if cluster is not None: | ||
stats.update( | ||
{ | ||
"clustering_fields": { | ||
"id": "clustering_fields", | ||
"label": AnyString(), | ||
"value": cluster, | ||
"description": AnyString(), | ||
"include": True, | ||
} | ||
} | ||
) | ||
|
||
has_stats = { | ||
"id": "has_stats", | ||
"label": "Has Stats?", | ||
"value": bool(stats), | ||
"description": "Indicates whether there are statistics for this table", | ||
"include": False, | ||
} | ||
stats["has_stats"] = has_stats | ||
|
||
return stats |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.