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

Add readthedocs.io documentation #1

Open
leo-schick opened this issue Oct 22, 2022 · 1 comment
Open

Add readthedocs.io documentation #1

leo-schick opened this issue Oct 22, 2022 · 1 comment

Comments

@leo-schick
Copy link
Member

A readthedocs.io. documentation is needed with samples how to use the package.

@leo-schick
Copy link
Member Author

When mara/mara-pipelines#69 is merged and published, a sample should be added in README and docs how to run dbt on a separate container through a Mara pipeline. For example:

from mara_pipelines.commands.sql import ExecuteSQL
from mara_pipelines.pipelines import Pipeline, Task
from mara_dbt.commands import DbtRun


pipeline = Pipeline(
    id='dwh_dbt',
    description="Runs additional dbt transformations on the data warehouse")

pipeline.add_initial(
    Task(id='initialize_schemas',
         description="Create the schema",
         max_retries=3,
         commands=[ExecuteSQL(sql_statement="""
EXEC util.drop_schema_force 'dbt_next'
GO
CREATE SCHEMA dbt_next
GO
""")]))

pipeline.add(
    Task(id='run',
         description='Run dbt run',
         commands=[DbtRun()],
         context='dbt-project-dwh'))

pipeline.add_final(
    Task(id='replace_schema',
         description="",
         commands=[ExecuteSQL("EXEC util.replace_schema 'dbt_next', 'dbt'")]))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant