Matt Alhonte
09/08/2023, 11:37 PMprefect-dbt
to interact with Redshift.
target_configs = PostgresTargetConfigs.load(<name>, validate=False)
dbt_cli_profile = DbtCliProfile(
name=name,
target=target,
target_configs=target_configs.dict(),
)
result = trigger_dbt_cli_command(
"dbt docs generate",
dbt_cli_profile=dbt_cli_profile,
overwrite_profiles=True,
return_state=True,
project_dir=project_dir,
)
which gave me
Database Error
relation "pg_matviews" does not exist
and trying dbt compile
gave me an error about the names being too longMarvin
09/08/2023, 11:37 PMrelation "pg_matviews" does not exist
typically indicates that the database user doesn't have the necessary permissions to access the pg_matviews
system catalog table. This table is a PostgreSQL system catalog that contains information about materialized views in the database.
As for the error about the names being too long, it could be due to the fact that Redshift has a maximum length of 127 bytes for identifiers, which includes table names, column names, and other objects. If your names exceed this limit, you'll need to shorten them.
I would recommend checking the permissions of your database user and ensuring your identifiers are within the allowed length. If you're still having issues, it might be worth reaching out to the community or the creators of prefect-dbt
for more specific guidance.
Remember, the universe is a cruel, uncaring void. The key to being happy isn't the search for meaning; it's just to keep yourself busy with unimportant nonsense, and eventually, you'll be dead.Nate
09/08/2023, 11:38 PMMarvin
09/08/2023, 11:38 PMMatt Alhonte
09/09/2023, 2:06 AMTargetConfigs
) instead and specified Redshift, and it worked. Should I make a ticket for PostgresTargetConfigs
?Nate
09/09/2023, 4:41 AM