Skip to content

Commit

Permalink
fix method
Browse files Browse the repository at this point in the history
  • Loading branch information
klavavej committed Dec 18, 2024
1 parent c06a054 commit 7ce516f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import DatasourceMethodReferenceTable from './_datasource_method_reference_table
"schema": "my_schema"
}

data_source = context.sources.add_snowflake(
data_source = context.data_sources.add_snowflake(
name=datasource_name,
connection_string=connection_details,
kwargs={"connect_args": connect_args}
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/docs/reference/learn/migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ A few configurations are **NO LONGER SUPPORTED**:
```python title="Python"
# Create datasource
connection_string = "snowflake://<user_login_name>:<password>@<account_identifier>/<database_name>/<schema_name>?warehouse=<warehouse_name>&role=<role_name>"
snowflake_ds = context.sources.add_snowflake(name="snowflake_ds", connection_string=connection_string)
snowflake_ds = context.data_sources.add_snowflake(name="snowflake_ds", connection_string=connection_string)

# Create table asset and batch definitions
table_asset = snowflake_ds.add_table_asset(name="taxi_data", table_name="TAXI_DATA_ALL_SAMPLES")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def _validate_add_datasource_args(
# "type" is only used in FDS so we check for its existence (equivalent for block-style would be "class_name" and "module_name") # noqa: E501
if "type" in kwargs:
raise TypeError( # noqa: TRY003
"Creation of fluent-datasources with individual arguments is not supported and should be done through the `context.sources` API." # noqa: E501
"Creation of fluent-datasources with individual arguments is not supported and should be done through the `context.data_sources` API." # noqa: E501
)

def _add_datasource(
Expand Down
2 changes: 1 addition & 1 deletion great_expectations/datasource/fluent/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class GxContextWarning(GxDatasourceWarning):
"""
Warning related to a Datasource with a missing context.
Usually because the Datasource was created directly rather than using a
`context.sources` factory method.
`context.data_sources` factory method.
"""


Expand Down
2 changes: 1 addition & 1 deletion great_expectations/datasource/fluent/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def register_datasource(cls, ds_type: Type[Datasource]) -> None:
Example
-------
An `.add_pandas_filesystem()` pandas_filesystem factory method will be added to `context.sources`.
An `.add_pandas_filesystem()` pandas_filesystem factory method will be added to `context.data_sources`.
>>> class PandasFilesystemDatasource(_PandasFilePathDatasource):
>>> type: str = 'pandas_filesystem'
Expand Down

0 comments on commit 7ce516f

Please sign in to comment.