diff --git a/metaphor/glue/extractor.py b/metaphor/glue/extractor.py index f1c5c361..53c1c9ba 100644 --- a/metaphor/glue/extractor.py +++ b/metaphor/glue/extractor.py @@ -99,7 +99,7 @@ def _get_tables(self, database: str): ) table_type = table.get("TableType") parameters = table.get("Parameters") - row_count = parameters.get("numRows") if parameters else None + row_count = int(parameters.get("numRows")) if parameters else 0 description = table.get("Description") dataset = self._init_dataset( diff --git a/poetry.lock b/poetry.lock index 1b930ae6..53c866a8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -668,8 +668,8 @@ files = [ jmespath = ">=0.7.1,<2.0.0" python-dateutil = ">=2.1,<3.0.0" urllib3 = [ - {version = ">=1.25.4,<1.27", markers = "python_version < \"3.10\""}, {version = ">=1.25.4,<2.2.0 || >2.2.0,<3", markers = "python_version >= \"3.10\""}, + {version = ">=1.25.4,<1.27", markers = "python_version < \"3.10\""}, ] [package.extras] @@ -1198,8 +1198,8 @@ files = [ [package.dependencies] lz4 = ">=4.0.2,<5.0.0" numpy = [ - {version = ">=1.16.6,<2.0.0", markers = "python_version >= \"3.8\" and python_version < \"3.11\""}, {version = ">=1.23.4,<2.0.0", markers = "python_version >= \"3.11\""}, + {version = ">=1.16.6,<2.0.0", markers = "python_version >= \"3.8\" and python_version < \"3.11\""}, ] oauthlib = ">=3.1.0,<4.0.0" openpyxl = ">=3.0.10,<4.0.0" @@ -1249,8 +1249,8 @@ isort = ">=4.3.21,<6.0" jinja2 = ">=2.10.1,<4.0" packaging = "*" pydantic = [ - {version = ">=1.5.1,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version < \"3.10\""}, {version = ">=1.10.0,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.11\" and python_version < \"4.0\""}, + {version = ">=1.5.1,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version < \"3.10\""}, {version = ">=1.9.0,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, ] pyyaml = ">=6.0.1" @@ -1745,12 +1745,12 @@ files = [ google-auth = ">=2.14.1,<3.0.dev0" googleapis-common-protos = ">=1.56.2,<2.0.dev0" grpcio = [ - {version = ">=1.33.2,<2.0dev", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, {version = ">=1.49.1,<2.0dev", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""}, + {version = ">=1.33.2,<2.0dev", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, ] grpcio-status = [ - {version = ">=1.33.2,<2.0.dev0", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, {version = ">=1.49.1,<2.0.dev0", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""}, + {version = ">=1.33.2,<2.0.dev0", optional = true, markers = "python_version < \"3.11\" and extra == \"grpc\""}, ] proto-plus = ">=1.22.3,<2.0.0dev" protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0" @@ -1886,8 +1886,8 @@ google-cloud-core = ">=2.0.0,<3.0.0dev" grpc-google-iam-v1 = ">=0.12.4,<1.0.0dev" opentelemetry-api = ">=1.9.0" proto-plus = [ - {version = ">=1.22.0,<2.0.0dev", markers = "python_version < \"3.11\""}, {version = ">=1.22.2,<2.0.0dev", markers = "python_version >= \"3.11\""}, + {version = ">=1.22.0,<2.0.0dev", markers = "python_version < \"3.11\""}, ] protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0dev" @@ -2029,13 +2029,13 @@ jsonschema = ">=2.5.1" marshmallow = ">=3.7.1,<4.0.0" mistune = ">=0.8.4" numpy = [ - {version = ">=1.21.6", markers = "python_version == \"3.9\""}, {version = ">=1.22.4", markers = "python_version >= \"3.10\""}, + {version = ">=1.21.6", markers = "python_version == \"3.9\""}, ] packaging = "*" pandas = [ - {version = ">=1.1.3,<2.2", markers = "python_version == \"3.9\""}, {version = ">=1.3.0,<2.2", markers = "python_version >= \"3.10\""}, + {version = ">=1.1.3,<2.2", markers = "python_version == \"3.9\""}, ] posthog = ">=2.1.0,<3" pydantic = ">=1.10.7" @@ -4091,8 +4091,8 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.22.4,<2", markers = "python_version < \"3.11\""}, {version = ">=1.23.2,<2", markers = "python_version == \"3.11\""}, + {version = ">=1.22.4,<2", markers = "python_version < \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -7134,7 +7134,7 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", type = ["pytest-mypy"] [extras] -all = ["GitPython", "SQLAlchemy", "asyncpg", "avro", "azure-identity", "azure-mgmt-datafactory", "beautifulsoup4", "confluent-kafka", "databricks-sdk", "databricks-sql-connector", "fastavro", "google-cloud-bigquery", "google-cloud-logging", "gql", "great-expectations", "grpcio-tools", "httpx", "lkml", "llama-index", "llama-index-embeddings-azure-openai", "llama-index-readers-confluence", "llama-index-readers-notion", "looker-sdk", "lxml", "more-itertools", "msal", "msgraph-beta-sdk", "nltk", "oracledb", "parse", "pycarlo", "pyhive", "pymongo", "pymssql", "pymysql", "sasl", "snowflake-connector-python", "sql-metadata", "sqlglot", "sqllineage", "tableauserverclient", "thoughtspot_rest_api_v1", "thrift", "thrift-sasl", "trino"] +all = ["GitPython", "SQLAlchemy", "asyncpg", "avro", "azure-identity", "azure-mgmt-datafactory", "beautifulsoup4", "confluent-kafka", "databricks-sdk", "databricks-sql-connector", "fastavro", "google-cloud-bigquery", "google-cloud-logging", "gql", "great-expectations", "grpcio-tools", "httpx", "lkml", "llama-index", "llama-index-embeddings-azure-openai", "llama-index-readers-confluence", "llama-index-readers-notion", "looker-sdk", "lxml", "more-itertools", "msal", "msgraph-beta-sdk", "nltk", "oracledb", "parse", "psycopg2", "pycarlo", "pyhive", "pymongo", "pymssql", "pymysql", "sasl", "snowflake-connector-python", "sql-metadata", "sqlglot", "sqllineage", "tableauserverclient", "thoughtspot_rest_api_v1", "thrift", "thrift-sasl", "trino"] bigquery = ["google-cloud-bigquery", "google-cloud-logging", "sql-metadata"] confluence = ["llama-index", "llama-index-embeddings-azure-openai", "llama-index-readers-confluence", "nltk"] datafactory = ["azure-identity", "azure-mgmt-datafactory"] @@ -7168,4 +7168,4 @@ unity-catalog = ["databricks-sdk", "databricks-sql-connector", "sqlglot"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "7398e4b3fd5001efa164496a63756dfca3d3a20ecc6100bd9d5f727f99d0a4be" +content-hash = "1f07de8dc6665a8fcc68f2cac5a41de7ff711a2028a06b3dc59ba2d31e5284e8" diff --git a/pyproject.toml b/pyproject.toml index 5e46483f..2c81925c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,6 +109,7 @@ all = [ "nltk", "oracledb", "parse", + "psycopg2", "pycarlo", "pyhive", "pymongo", @@ -132,7 +133,7 @@ confluence = ["llama-index", "llama-index-embeddings-azure-openai", "llama-index datafactory = ["azure-identity", "azure-mgmt-datafactory"] datahub = ["gql"] dbt = ["httpx"] -great_expectations = ["great-expectations", "SQLAlchemy","psycopg2"] +great_expectations = ["great-expectations", "SQLAlchemy", "psycopg2"] hive = ["pyhive", "sasl", "thrift", "thrift-sasl"] kafka = ["confluent-kafka", "avro", "grpcio-tools"] looker = ["GitPython", "lkml", "looker-sdk"]