Hi, I have a problema with integrated 'elementary...
# community-support
r
Hi, I have a problema with integrated 'elementary' with 'dbt' about 'pydantic' and I do not how can to fix that. Anyone can I help me, please? Message Error: ------ /home/rafaelgf/.local/lib/python3.9/site-packages/pydantic/_internal/_fields.py128 UserWarning: Field "model_unique_ids" has conflict with protected namespace "model_". You may be able to resolve this warning by setting
model_config['protected_namespaces'] = ()
. warnings.warn( /home/rafaelgf/.local/lib/python3.9/site-packages/pydantic/_internal/_fields.py128 UserWarning: Field "model_runs" has conflict with protected namespace "model_". You may be able to resolve this warning by setting
model_config['protected_namespaces'] = ()
. warnings.warn( /home/rafaelgf/.local/lib/python3.9/site-packages/pydantic/_internal/_fields.py128 UserWarning: Field "model_unique_id" has conflict with protected namespace "model_". You may be able to resolve this warning by setting
model_config['protected_namespaces'] = ()
. warnings.warn( /home/rafaelgf/.local/lib/python3.9/site-packages/pydantic/_internal/_fields.py128 UserWarning: Field "model_name" has conflict with protected namespace "model_". You may be able to resolve this warning by setting
model_config['protected_namespaces'] = ()
. warnings.warn( Traceback (most recent call last): File "/usr/local/bin/edr", line 5, in module from elementary.cli.cli import cli File "/usr/local/lib/python3.9/dist-packages/elementary/cli/cli.py", line 9, in module from elementary.monitor.cli import monitor, report, send_report File "/usr/local/lib/python3.9/dist-packages/elementary/monitor/cli.py", line 9, in module from elementary.monitor.data_monitoring.report.data_monitoring_report import ( File "/usr/local/lib/python3.9/dist-packages/elementary/monitor/data_monitoring/report/data_monitoring_report.py", line 14, in module from elementary.monitor.api.report.report import ReportAPI File "/usr/local/lib/python3.9/dist-packages/elementary/monitor/api/report/report.py", line 5, in module from elementary.monitor.api.filters.filters import FiltersAPI File "/usr/local/lib/python3.9/dist-packages/elementary/monitor/api/filters/filters.py", line 5, in module from elementary.monitor.api.models.schema import ( File "/usr/local/lib/python3.9/dist-packages/elementary/monitor/api/models/schema.py", line 40, in module class NormalizedModelSchema(NormalizedArtifactSchema, ModelSchema): File "/usr/local/lib/python3.9/dist-packages/elementary/monitor/api/models/schema.py", line 41, in NormalizedModelSchema artifact_type: str = Field("model", const=True) File "/home/rafaelgf/.local/lib/python3.9/site-packages/pydantic/fields.py", line 763, in Field raise PydanticUserError('`const` is removed, use
Literal
instead', code='removed-kwargs') pydantic.errors.PydanticUserError:
const
is removed, use
Literal
instead For further information visit https://errors.pydantic.dev/2.4/u/removed-kwargs ----- Elementary version: Name: elementary-data Version: 0.12.0 Summary: Data monitoring and lineage Home-page: https://www.elementary-data.com Author: Elementary Author-email: None License: Apache-2.0 Location: /home/airflow/dbt-env/lib/python3.9/site-packages Requires: boto3, alive-progress, ruamel.yaml, beautifulsoup4, pytest-parametrization, requests, slack-sdk, azure-storage-blob, ratelimit, dbt-core, networkx, google-cloud-storage, packaging, posthog, pyfiglet, click, pydantic Required-by: Pydantic Version: Name: pydantic Version: 1.10.13 Summary: Data validation and settings management using python type hints Home-page: https://github.com/pydantic/pydantic Author: Samuel Colvin Author-email: s@muelcolvin.com License: MIT Location: /home/airflow/dbt-env/lib/python3.9/site-packages Requires: typing-extensions Required-by: elementary-data, dbt-semantic-interfaces DBT-CORE Version: Name: dbt-core Version: 1.7.1 Summary: With dbt, data analysts and engineers can build analytics the way engineers build applications. Home-page: https://github.com/dbt-labs/dbt-core Author: dbt Labs Author-email: info@dbtlabs.com License: None Location: /home/airflow/dbt-env/lib/python3.9/site-packages Requires: isodate, logbook, click, agate, cffi, jsonschema, dbt-semantic-interfaces, Jinja2, protobuf, colorama, mashumaro, typing-extensions, idna, urllib3, pyyaml, pytz, networkx, packaging, dbt-extractor, pathspec, requests, sqlparse, minimal-snowplow-tracker Required-by: elementary-data, dbt-bigquery
i
Hey @rafael fernandes! Are you working on a clean venv where you installed only elementary python package? If not, can you try and do that and run the command from there?
r
Hi @Idan Shavit. No, here libs in my venv: Package Version ------------------------- ------------ agate 1.7.1 attrs 23.1.0 Babel 2.13.1 cachetools 5.3.2 certifi 2023.7.22 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 colorama 0.4.6 dbt-bigquery 1.7.2 dbt-core 1.7.1 dbt-extractor 0.5.0 dbt-semantic-interfaces 0.4.1 google-api-core 2.14.0 google-auth 2.23.4 google-cloud-bigquery 3.13.0 google-cloud-core 2.3.3 google-cloud-dataproc 5.7.0 google-cloud-storage 2.13.0 google-crc32c 1.5.0 google-resumable-media 2.6.0 googleapis-common-protos 1.61.0 grpc-google-iam-v1 0.12.7 grpcio 1.59.2 grpcio-status 1.59.2 idna 3.4 importlib-metadata 6.8.0 isodate 0.6.1 Jinja2 3.1.2 jsonschema 4.19.2 jsonschema-specifications 2023.7.1 leather 0.3.4 Logbook 1.5.3 MarkupSafe 2.1.3 mashumaro 3.10 minimal-snowplow-tracker 0.0.2 more-itertools 10.1.0 msgpack 1.0.7 networkx 3.2.1 packaging 23.2 parsedatetime 2.6 pathspec 0.11.2 pip 20.3.4 pkg-resources 0.0.0 proto-plus 1.22.3 protobuf 4.25.0 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycparser 2.21 pydantic 1.10.13 python-dateutil 2.8.2 python-slugify 8.0.1 pytimeparse 1.1.8 pytz 2023.3.post1 PyYAML 6.0.1 referencing 0.30.2 requests 2.31.0 rpds-py 0.12.0 rsa 4.9 setuptools 44.1.1 six 1.16.0 sqlparse 0.4.4 text-unidecode 1.3 typing-extensions 4.8.0 urllib3 1.26.18 zipp 3.17.0
image.png
image.png
o
Hi @rafael fernandes, sorry for the late response there seems to be a mismatch between the environment you run your
dbt
in (
/usr/local/lib/python3.9/dist-packages
) and the environment you check your package versions in (
/home/airflow/dbt-env/lib/python3.9/site-packages
). why is that?