Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/issue 1661 add tip to source docs and update weaviate docs #1662

Merged
merged 9 commits into from
Aug 23, 2024

Conversation

dat-a-man
Copy link
Collaborator

Description

#1661

This PR clarifies the behavior of the max_table_nesting parameter, ensuring users understand that it doesn’t automatically apply to individual resources. It provides guidance on how to correctly apply the parameter to achieve the desired effect.

@dat-a-man dat-a-man self-assigned this Aug 3, 2024
@dat-a-man dat-a-man requested a review from VioletM August 3, 2024 06:16
@dat-a-man dat-a-man added the documentation Improvements or additions to documentation label Aug 3, 2024
Copy link

netlify bot commented Aug 3, 2024

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit 2c0d6b5
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/66c873ed967fc400085fb1ac
😎 Deploy Preview https://deploy-preview-1662--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dat-a-man dat-a-man added the community This issue came from slack community workspace label Aug 3, 2024
@dat-a-man dat-a-man linked an issue Aug 3, 2024 that may be closed by this pull request
@dat-a-man dat-a-man changed the title Docs/issue 1661 add tip to source docs Docs/issue 1661 add tip to source docs and update weaviate docs Aug 4, 2024
Copy link
Contributor

@VioletM VioletM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, added some comments :)

@@ -116,6 +116,22 @@ weaviate_adapter(
tokenization={"title": "word", "description": "whitespace"},
)
```
When adapting resources, it's important to implement changes directly to the data source itself rather than extracting resources separately. Here's how:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When adapting resources, it's important to implement changes directly to the data source itself rather than extracting resources separately. Here's how:
When using the `weaviate_adapter`, it's important to apply it directly to resources, not to the whole source. Here's an example:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

destination="weaviate",
)

# adapt the resource within the source
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# adapt the resource within the source
# apply adapter to the needed resources

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

:::tip TIP
The `max_table_nesting` parameter at the source level doesn't automatically apply to individual
resources when accessed directly (e.g., using `source.resources["resource_1"])`. To make sure it
works, either use `source.with_resources("resource_1")` or set the parameter directly on the resource.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, add an example how parameter could be set directly in the resource

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

products_tables = sql_database().with_resources("products", "customers")

pipeline = dlt.pipeline(
pipeline_name="postgres_to_weaviate_pipeline",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pipeline_name="postgres_to_weaviate_pipeline",
pipeline_name="postgres_to_lancedb_pipeline",

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


pipeline = dlt.pipeline(
pipeline_name="postgres_to_weaviate_pipeline",
destination="weaviate",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
destination="weaviate",
destination="lancedb",

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

products_tables = sql_database().with_resources("products", "customers")

pipeline = dlt.pipeline(
pipeline_name="postgres_to_weaviate_pipeline",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pipeline_name="postgres_to_weaviate_pipeline",
pipeline_name="postgres_to_qdrant_pipeline",

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


pipeline = dlt.pipeline(
pipeline_name="postgres_to_weaviate_pipeline",
destination="weaviate",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
destination="weaviate",
destination="qdrant",

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

...
```


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
or
```py
my_source = my_source()
my_source.my_resource.max_table_nesting = 0

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@VioletM VioletM merged commit c51445c into devel Aug 23, 2024
47 checks passed
@dat-a-man dat-a-man deleted the docs/issue-1661-add-tip-to-source-docs branch August 31, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community This issue came from slack community workspace documentation Improvements or additions to documentation
Projects
Status: Done
2 participants