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

fix(ingestion/looker): fix doc for sql parsing documentation #10883

Merged
merged 7 commits into from
Jul 19, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions metadata-ingestion/docs/sources/looker/lookml_post.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#### Configuration Notes

:::note

The integration can use an SQL parser to try to parse the tables the views depends on.

:::
1. If a view contains a liquid template (e.g. `sql_table_name: {{ user_attributes['db']}}.kafka_streaming.events, with db=ANALYTICS_PROD`), then you will need to specify the values of those variables in the `liquid_variable` config as shown below
hsheth2 marked this conversation as resolved.
Show resolved Hide resolved
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

yml

hsheth2 marked this conversation as resolved.
Show resolved Hide resolved
liquid_variable:
user_attributes:
db: ANALYTICS_PROD

hsheth2 marked this conversation as resolved.
Show resolved Hide resolved
This parsing is disabled by default, but can be enabled by setting `parse_table_names_from_sql: True`. The default parser is based on the [`sqllineage`](https://pypi.org/project/sqllineage/) package.
As this package doesn't officially support all the SQL dialects that Looker supports, the result might not be correct. You can, however, implement a custom parser and take it into use by setting the `sql_parser` configuration value. A custom SQL parser must inherit from `datahub.utilities.sql_parser.SQLParser`
and must be made available to Datahub by ,for example, installing it. The configuration then needs to be set to `module_name.ClassName` of the parser.
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Specify language for code blocks to enhance readability and compliance.

The fenced code block should specify a language to comply with Markdown best practices and enhance syntax highlighting.

-    ```
+    ```yaml
-    ```
+    ```yaml
Tools
Markdownlint

4-4: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


### Multi-Project LookML (Advanced)

Expand Down
Loading