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

Fixes logo_url for dbt blocks #298

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all 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
16 changes: 8 additions & 8 deletions views/aggregate-block-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3635,7 +3635,7 @@
"dbt-cli-bigquery-target-configs": {
"name": "dbt CLI BigQuery Target Configs",
"slug": "dbt-cli-bigquery-target-configs",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/ff9a2573c23954bedd27b0f420465a55b1a99dfd-250x250.png",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/f9d31c6978410fe25a70e75fc7e77b5c430b3178-180x162.png",
"documentation_url": "https://prefecthq.github.io/prefect-dbt/cli/configs/bigquery/#prefect_dbt.cli.configs.bigquery.BigQueryTargetConfigs",
"description": "dbt CLI target configs containing credentials and settings, specific to BigQuery. This block is part of the prefect-dbt collection. Install prefect-dbt with `pip install prefect-dbt` to use this block.",
"code_example": "Load stored BigQueryTargetConfigs.\n```python\nfrom prefect_dbt.cli.configs import BigQueryTargetConfigs\n\nbigquery_target_configs = BigQueryTargetConfigs.load(\"BLOCK_NAME\")\n```\n\nInstantiate BigQueryTargetConfigs.\n```python\nfrom prefect_dbt.cli.configs import BigQueryTargetConfigs\nfrom prefect_gcp.credentials import GcpCredentials\n\ncredentials = GcpCredentials.load(\"BLOCK-NAME-PLACEHOLDER\")\ntarget_configs = BigQueryTargetConfigs(\n schema=\"schema\", # also known as dataset\n credentials=credentials,\n)\n```",
Expand Down Expand Up @@ -3743,7 +3743,7 @@
"dbt-cli-global-configs": {
"name": "dbt CLI Global Configs",
"slug": "dbt-cli-global-configs",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/ff9a2573c23954bedd27b0f420465a55b1a99dfd-250x250.png",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/f9d31c6978410fe25a70e75fc7e77b5c430b3178-180x162.png",
"documentation_url": "https://prefecthq.github.io/prefect-dbt/cli/configs/base/#prefect_dbt.cli.configs.base.GlobalConfigs",
"description": "Global configs control things like the visual output\nof logs, the manner in which dbt parses your project,\nand what to do when dbt finds a version mismatch\nor a failing model. Docs can be found [here](\nhttps://docs.getdbt.com/reference/global-configs). This block is part of the prefect-dbt collection. Install prefect-dbt with `pip install prefect-dbt` to use this block.",
"code_example": "Load stored GlobalConfigs:\n```python\nfrom prefect_dbt.cli.configs import GlobalConfigs\n\ndbt_cli_global_configs = GlobalConfigs.load(\"BLOCK_NAME\")\n```",
Expand Down Expand Up @@ -3837,7 +3837,7 @@
"dbt-cli-postgres-target-configs": {
"name": "dbt CLI Postgres Target Configs",
"slug": "dbt-cli-postgres-target-configs",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/ff9a2573c23954bedd27b0f420465a55b1a99dfd-250x250.png",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/f9d31c6978410fe25a70e75fc7e77b5c430b3178-180x162.png",
"documentation_url": "https://prefecthq.github.io/prefect-dbt/cli/configs/postgres/#prefect_dbt.cli.configs.postgres.PostgresTargetConfigs",
"description": "dbt CLI target configs containing credentials and settings specific to Postgres. This block is part of the prefect-dbt collection. Install prefect-dbt with `pip install prefect-dbt` to use this block.",
"code_example": "Load stored PostgresTargetConfigs:\n```python\nfrom prefect_dbt.cli.configs import PostgresTargetConfigs\n\npostgres_target_configs = PostgresTargetConfigs.load(\"BLOCK_NAME\")\n```\n\nInstantiate PostgresTargetConfigs with DatabaseCredentials.\n```python\nfrom prefect_dbt.cli.configs import PostgresTargetConfigs\nfrom prefect_sqlalchemy import DatabaseCredentials, SyncDriver\n\ncredentials = DatabaseCredentials(\n driver=SyncDriver.POSTGRESQL_PSYCOPG2,\n username=\"prefect\",\n password=\"prefect_password\",\n database=\"postgres\",\n host=\"host\",\n port=8080\n)\ntarget_configs = PostgresTargetConfigs(credentials=credentials, schema=\"schema\")\n```",
Expand Down Expand Up @@ -4133,7 +4133,7 @@
"dbt-cli-profile": {
"name": "dbt CLI Profile",
"slug": "dbt-cli-profile",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/ff9a2573c23954bedd27b0f420465a55b1a99dfd-250x250.png",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/f9d31c6978410fe25a70e75fc7e77b5c430b3178-180x162.png",
"documentation_url": "https://prefecthq.github.io/prefect-dbt/cli/credentials/#prefect_dbt.cli.credentials.DbtCliProfile",
"description": "Profile for use across dbt CLI tasks and flows. This block is part of the prefect-dbt collection. Install prefect-dbt with `pip install prefect-dbt` to use this block.",
"code_example": "Load stored dbt CLI profile:\n```python\nfrom prefect_dbt.cli import DbtCliProfile\ndbt_cli_profile = DbtCliProfile.load(\"BLOCK_NAME\").get_profile()\n```\n\nGet a dbt Snowflake profile from DbtCliProfile by using SnowflakeTargetConfigs:\n```python\nfrom prefect_dbt.cli import DbtCliProfile\nfrom prefect_dbt.cli.configs import SnowflakeTargetConfigs\nfrom prefect_snowflake.credentials import SnowflakeCredentials\nfrom prefect_snowflake.database import SnowflakeConnector\n\ncredentials = SnowflakeCredentials(\n user=\"user\",\n password=\"password\",\n account=\"account.region.aws\",\n role=\"role\",\n)\nconnector = SnowflakeConnector(\n schema=\"public\",\n database=\"database\",\n warehouse=\"warehouse\",\n credentials=credentials,\n)\ntarget_configs = SnowflakeTargetConfigs(\n connector=connector\n)\ndbt_cli_profile = DbtCliProfile(\n name=\"jaffle_shop\",\n target=\"dev\",\n target_configs=target_configs,\n)\nprofile = dbt_cli_profile.get_profile()\n```\n\nGet a dbt Redshift profile from DbtCliProfile by using generic TargetConfigs:\n```python\nfrom prefect_dbt.cli import DbtCliProfile\nfrom prefect_dbt.cli.configs import GlobalConfigs, TargetConfigs\n\ntarget_configs_extras = dict(\n host=\"hostname.region.redshift.amazonaws.com\",\n user=\"username\",\n password=\"password1\",\n port=5439,\n dbname=\"analytics\",\n)\ntarget_configs = TargetConfigs(\n type=\"redshift\",\n schema=\"schema\",\n threads=4,\n extras=target_configs_extras\n)\ndbt_cli_profile = DbtCliProfile(\n name=\"jaffle_shop\",\n target=\"dev\",\n target_configs=target_configs,\n)\nprofile = dbt_cli_profile.get_profile()\n```",
Expand Down Expand Up @@ -4945,7 +4945,7 @@
"dbt-cli-snowflake-target-configs": {
"name": "dbt CLI Snowflake Target Configs",
"slug": "dbt-cli-snowflake-target-configs",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/ff9a2573c23954bedd27b0f420465a55b1a99dfd-250x250.png",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/f9d31c6978410fe25a70e75fc7e77b5c430b3178-180x162.png",
"documentation_url": "https://prefecthq.github.io/prefect-dbt/cli/configs/snowflake/#prefect_dbt.cli.configs.snowflake.SnowflakeTargetConfigs",
"description": "Target configs contain credentials and\nsettings, specific to Snowflake.\nTo find valid keys, head to the [Snowflake Profile](\nhttps://docs.getdbt.com/reference/warehouse-profiles/snowflake-profile)\npage. This block is part of the prefect-dbt collection. Install prefect-dbt with `pip install prefect-dbt` to use this block.",
"code_example": "Load stored SnowflakeTargetConfigs:\n```python\nfrom prefect_dbt.cli.configs import SnowflakeTargetConfigs\n\nsnowflake_target_configs = SnowflakeTargetConfigs.load(\"BLOCK_NAME\")\n```\n\nInstantiate SnowflakeTargetConfigs.\n```python\nfrom prefect_dbt.cli.configs import SnowflakeTargetConfigs\nfrom prefect_snowflake.credentials import SnowflakeCredentials\nfrom prefect_snowflake.database import SnowflakeConnector\n\ncredentials = SnowflakeCredentials(\n user=\"user\",\n password=\"password\",\n account=\"account.region.aws\",\n role=\"role\",\n)\nconnector = SnowflakeConnector(\n schema=\"public\",\n database=\"database\",\n warehouse=\"warehouse\",\n credentials=credentials,\n)\ntarget_configs = SnowflakeTargetConfigs(\n connector=connector,\n extras={\"retry_on_database_errors\": True},\n)\n```",
Expand Down Expand Up @@ -5178,7 +5178,7 @@
"dbt-cli-target-configs": {
"name": "dbt CLI Target Configs",
"slug": "dbt-cli-target-configs",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/ff9a2573c23954bedd27b0f420465a55b1a99dfd-250x250.png",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/f9d31c6978410fe25a70e75fc7e77b5c430b3178-180x162.png",
"documentation_url": "https://prefecthq.github.io/prefect-dbt/cli/configs/base/#prefect_dbt.cli.configs.base.TargetConfigs",
"description": "Target configs contain credentials and\nsettings, specific to the warehouse you're connecting to.\nTo find valid keys, head to the [Available adapters](\nhttps://docs.getdbt.com/docs/available-adapters) page and\nclick the desired adapter's \"Profile Setup\" hyperlink. This block is part of the prefect-dbt collection. Install prefect-dbt with `pip install prefect-dbt` to use this block.",
"code_example": "Load stored TargetConfigs:\n```python\nfrom prefect_dbt.cli.configs import TargetConfigs\n\ndbt_cli_target_configs = TargetConfigs.load(\"BLOCK_NAME\")\n```",
Expand Down Expand Up @@ -5232,7 +5232,7 @@
"dbt-cloud-credentials": {
"name": "dbt Cloud Credentials",
"slug": "dbt-cloud-credentials",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/ff9a2573c23954bedd27b0f420465a55b1a99dfd-250x250.png",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/f9d31c6978410fe25a70e75fc7e77b5c430b3178-180x162.png",
"documentation_url": "https://prefecthq.github.io/prefect-dbt/cloud/credentials/#prefect_dbt.cloud.credentials.DbtCloudCredentials",
"description": "Credentials block for credential use across dbt Cloud tasks and flows. This block is part of the prefect-dbt collection. Install prefect-dbt with `pip install prefect-dbt` to use this block.",
"code_example": "Load stored dbt Cloud credentials:\n```python\nfrom prefect_dbt.cloud import DbtCloudCredentials\n\ndbt_cloud_credentials = DbtCloudCredentials.load(\"BLOCK_NAME\")\n```\n\nUse DbtCloudCredentials instance to trigger a job run:\n```python\nfrom prefect_dbt.cloud import DbtCloudCredentials\n\ncredentials = DbtCloudCredentials(api_key=\"my_api_key\", account_id=123456789)\n\nasync with dbt_cloud_credentials.get_administrative_client() as client:\n client.trigger_job_run(job_id=1)\n```\n\nLoad saved dbt Cloud credentials within a flow:\n```python\nfrom prefect import flow\n\nfrom prefect_dbt.cloud import DbtCloudCredentials\nfrom prefect_dbt.cloud.jobs import trigger_dbt_cloud_job_run\n\n\n@flow\ndef trigger_dbt_cloud_job_run_flow():\n credentials = DbtCloudCredentials.load(\"my-dbt-credentials\")\n trigger_dbt_cloud_job_run(dbt_cloud_credentials=credentials, job_id=1)\n\ntrigger_dbt_cloud_job_run_flow()\n```",
Expand Down Expand Up @@ -5279,7 +5279,7 @@
"dbt-core-operation": {
"name": "dbt Core Operation",
"slug": "dbt-core-operation",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/ff9a2573c23954bedd27b0f420465a55b1a99dfd-250x250.png",
"logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/f9d31c6978410fe25a70e75fc7e77b5c430b3178-180x162.png",
"documentation_url": "https://prefecthq.github.io/prefect-dbt/cli/commands/#prefect_dbt.cli.commands.DbtCoreOperation",
"description": "A block representing a dbt operation, containing multiple dbt and shell commands.\n\nFor long-lasting operations, use the trigger method and utilize the block as a\ncontext manager for automatic closure of processes when context is exited.\nIf not, manually call the close method to close processes.\n\nFor short-lasting operations, use the run method. Context is automatically managed\nwith this method. This block is part of the prefect-dbt collection. Install prefect-dbt with `pip install prefect-dbt` to use this block.",
"code_example": "Load a configured block.\n```python\nfrom prefect_dbt import DbtCoreOperation\n\ndbt_op = DbtCoreOperation.load(\"BLOCK_NAME\")\n```\n\nExecute short-lasting dbt debug and list with a custom DbtCliProfile.\n```python\nfrom prefect_dbt import DbtCoreOperation, DbtCliProfile\nfrom prefect_dbt.cli.configs import SnowflakeTargetConfigs\nfrom prefect_snowflake import SnowflakeConnector\n\nsnowflake_connector = await SnowflakeConnector.load(\"snowflake-connector\")\ntarget_configs = SnowflakeTargetConfigs(connector=snowflake_connector)\ndbt_cli_profile = DbtCliProfile(\n name=\"jaffle_shop\",\n target=\"dev\",\n target_configs=target_configs,\n)\nprofile = dbt_cli_profile.get_profile()\ndbt_init = DbtCoreOperation(\n commands=[\"dbt debug\", \"dbt list\"],\n dbt_cli_profile=dbt_cli_profile,\n overwrite_profiles=True\n)\ndbt_init.run()\n```\n\nExecute a longer-lasting dbt run as a context manager.\n```python\nwith DbtCoreOperation(commands=[\"dbt run\"]) as dbt_run:\n dbt_process = dbt_run.trigger()\n # do other things\n dbt_process.wait_for_completion()\n dbt_output = dbt_process.fetch_result()\n```",
Expand Down