Skip to content

Commit

Permalink
Fix description detection
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Max committed Nov 22, 2023
1 parent c223a06 commit e2528a5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ _local

# Output directory of the package itself
**/output
**/target/bq2dbt

# Distribution / packaging
build/
Expand Down
8 changes: 6 additions & 2 deletions bq2dbt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
and basic select query with explicit columns list
"""

__version__ = "0.1.0"
__author__ = 'Henri-Maxime Ducoulombier'
from .bq2dbt import bq2dbt


def main():
"""Entry point for the application script"""
bq2dbt()
6 changes: 1 addition & 5 deletions bq2dbt/bq2dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def bq2dbt():
field_info = {
"name": destination,
"data_type": data_type.lower() if args.lower else data_type,
"description": field.description
"description": field.description or ""
}
if field.is_nullable == 'NO':
field_info = {**field_info, **{
Expand Down Expand Up @@ -165,7 +165,3 @@ def bq2dbt():
sql_file.write(sql_output.strip())

logger.info("Operation complete")


if __name__ == '__main__':
bq2dbt()
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ dependencies = [
]
dynamic = ["version"]

[project.scripts] # Optional
bq2dbt = "bq2dbt:bq2dbt"

[tool.setuptools]
packages = ["bq2dbt"]

Expand Down

0 comments on commit e2528a5

Please sign in to comment.