Repository navigation
release_branch/v2.6.0 - #194
fivetran-savage wants to merge 24 commits into
Conversation
* Buildkite improvements FY27 Q2 (#192) * Buildkite improvements * Update dbt_project.yml --------- Co-authored-by: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> * feature/add_errors_and_warnings_model * update_model * Update integration_tests/ci/test_scenarios.yml Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> --------- Co-authored-by: Fivetran Maintainer Bot <129092423+fivetran-data-model-bot@users.noreply.github.com> Co-authored-by: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com>
* feature/new_fivetran_log_end_model * add_consistancy_integrity_tests * revert_integration_yml * fix_syntax_for_sql_server * fix_syntax * remove_status_column * add_unnest_macro * revert_integration_yml * change_cte_names * update_syntax * Generate dbt docs via GitHub Actions * Update number of materialized models in README * update_connection_ids * update_macro * add_unknown_transformation_status * Update column types for dbt_project.yml --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feature/add_audit_trail_events * add_audit_trail_end_model * dedup_connection_id
* feature/build_sync_statistics_and_duration_model Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix_boolean_for_sql_server * add_consistency_tests --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
hey @fivetran-savage , @fivetran-joemarkiewicz pointed me to this PR. we were looking at how we could add sync details into this QDM, which it seems you were already working toward! there may be some changes that @fivetran-arakovskii will be making as part of https://fivetran.atlassian.net/browse/RD-1007740 so we should stay aligned here |
|
@amypeterson27 thanks for the heads up! Most relevant to the |
…ns in transformation_run_log Retains the non-lookback changes originally bundled in cd2e8a0: - Add event_id to the fivetran_platform__errors_and_warnings surrogate key (and matching yml description); drop the stale "Excludes INFO-level events" README note. - Deduplicate connections in fivetran_platform__transformation_run_log by connection_id, preferring non-deleted / most recent set_up_at. - Add fivetran_platform_audit_trail_identifier to integration test vars. - DECISIONLOG formatting. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
43b3ed1 to
eda9246
Compare
|
Hey @fivetran-savage — I wanted to flag a question about table-level coverage. The current fivetran_platform__sync_metrics model gives us one row per completed sync, which is great. But customers are also asking for per-table granularity (rows extracted/loaded per table per sync).
The main question for you: is a second model — something like fivetran_platform__table_sync_metrics — feasible, given the JSON array unnesting required for extract_summary.objects[]? Or if this needs to wait for the next version, that's probably okay too. Would love to jump on a quick call if helpful. |
* add_lookback_window_variable Adds the optional fivetran_platform_lookback_window_months variable to limit log history in log-based models. Filters stg_fivetran_platform__log_tmp (now materialized as a table) by time_stamp, with docs in README, CHANGELOG, and the quickstart supported_vars. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * update_changelog * update_seed_data * update_macro * update_changelog * Update CHANGELOG.md * update_variable_placement * update_documentation * update_variable * Apply suggestions from code review Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com>
fivetran-joemarkiewicz
left a comment
There was a problem hiding this comment.
@fivetran-savage great work on this PR. A few comments before approving.
| `fivetran_platform__connection_status` | ||
| `fivetran_platform__schema_changelog` | ||
| `fivetran_platform__audit_user_activity` | ||
| `fivetran_platform__connection_daily_events` | ||
| `fivetran_platform__audit_table`. |
There was a problem hiding this comment.
| `fivetran_platform__connection_status` | |
| `fivetran_platform__schema_changelog` | |
| `fivetran_platform__audit_user_activity` | |
| `fivetran_platform__connection_daily_events` | |
| `fivetran_platform__audit_table`. | |
| - `fivetran_platform__connection_status` | |
| - `fivetran_platform__schema_changelog` | |
| - `fivetran_platform__audit_user_activity` | |
| - `fivetran_platform__connection_daily_events` | |
| - `fivetran_platform__audit_table` |
| supported_vars: | ||
| fivetran_platform_log_start_date: | ||
| type: string | ||
| description: "Earliest date (YYYY-MM-DD) of log history to include when building log-based models. When unset, all log history is used. Because it is a fixed date, a full refresh always reloads from this start date and never loses history. Affects `fivetran_platform__connection_status`, `fivetran_platform__schema_changelog`, `fivetran_platform__audit_user_activity`, `fivetran_platform__connection_daily_events`, and `fivetran_platform__audit_table`." |
There was a problem hiding this comment.
The newly added models in this PR are also impacted by the variable. Since this list is becoming exhaustive, it may be best to instead list which models are not impacted. It looks like it's just two: fivetran_platform__mar_table_history, fivetran_platform__usage_history
| - `stg_fivetran_platform__transformation_runs` has no fixed default. It checks your schema for the `transformation_runs` table at runtime. If the table exists, the staging model and the `paid_model_runs`, `free_model_runs`, and `total_model_runs` fields in `fivetran_platform__usage_history` are populated. If it does not, the staging model builds empty and those fields are null. | ||
| - `fivetran_platform__transformation_run_log` defaults to `false` and does not build. The runtime check does not apply here, so set this variable to `true` to build the model. | ||
|
|
||
| Setting the variable explicitly overrides both layers. `true` requires the `transformation_runs` table to exist, and `false` disables the staging model and its downstream fields even when the table does exist. |
There was a problem hiding this comment.
Was this meant to be a bulleted item? If so, let's add that. If not, let's fix the indent
There was a problem hiding this comment.
It's a continuation of the paragraph started with "transformation_runs has no fixed default" but it looks odd when rendered, so I'll move all the bullets below the paragraph.
| `fivetran_platform__connection_status` | ||
| `fivetran_platform__schema_changelog` | ||
| `fivetran_platform__audit_user_activity` | ||
| `fivetran_platform__connection_daily_events` | ||
| `fivetran_platform__audit_table` |
There was a problem hiding this comment.
Can we have this be a bulleted list so it renders better in markdown. Also, I believe we're missing the new models that are also impacted.
* update_sync_metrics * add_rows_extracted * incorporate_review_feedback * update_decisionlog * update_tests
| sync_id, | ||
| created_at as event_time, | ||
| level as severity_level, | ||
| message, |
There was a problem hiding this comment.
The SDK sample query filters on message_origin, but this model drops it. Can we pass it through and document its values?
| description: Number of models that ran successfully in this transformation execution. | ||
| - name: failed_model_runs | ||
| description: Number of models that failed in this transformation execution. | ||
| - name: transformation_status |
There was a problem hiding this comment.
Document the fallback here. When step_success is null, the model returns the raw event_subtype, but this lists only three values.
| from the deprecated `fivetran_audit`, which reported pre-duplicate data loads. | ||
| columns: | ||
| - name: unique_table_sync_key | ||
| description: Primary key of the table, hashed on `schema_name`, `connection_id`, `destination_id`, `table_name`, and `unique_table_sync_key`. |
There was a problem hiding this comment.
typo
| description: Primary key of the table, hashed on `schema_name`, `connection_id`, `destination_id`, `table_name`, and `write_to_table_start `. |
| To use this dbt package, you must have the following: | ||
|
|
||
| - A Fivetran Platform connection syncing data into your destination. | ||
| - A **BigQuery**, **Snowflake**, **Redshift**, **Postgres**, **Databricks**, or **SQL Server** destination. |
There was a problem hiding this comment.
Oops I missed this last update.
| - A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, **Databricks**, **SQL Server**, or **DuckDB** destination. | |
| @@ -40,6 +40,10 @@ | |||
| | [fivetran_platform__schema_changelog](https://fivetran.github.io/dbt_fivetran_log/#!/model/model.fivetran_log.fivetran_platform__schema_changelog) | Documents all schema changes made to your connections including table alterations, table creations, schema creations, and configuration changes with detailed metadata about each event to track data structure evolution and troubleshoot schema-related issues. | | |||
| | [fivetran_platform__audit_table](https://fivetran.github.io/dbt_fivetran_log/#!/model/model.fivetran_log.fivetran_platform__audit_table) | Replaces the deprecated [`_fivetran_audit` table](https://fivetran.com/docs/getting-started/system-columns-and-tables#audittables) and tracks each table receiving data during connection syncs with comprehensive timestamps for connection and table-level sync progress plus detailed counts of records inserted, replaced, updated, and deleted to monitor data processing and sync performance. | | |||
There was a problem hiding this comment.
Suggest to add about rows_extracted and rows_loaded.
| - `>=1.3.0, <3.0.0` | ||
|
|
||
| ## What does this dbt package do? | ||
| This package enables you to better understand how you are spending money in Fivetran according to our [consumption-based pricing model](https://fivetran.com/docs/usage-based-pricing) and provides details about the performance and status of your Fivetran connections. It creates enriched models with metrics focused on consumption data, monthly active rows (MAR), credit consumption, connection events, schema changes, and audit logs. |
There was a problem hiding this comment.
Suggest to add a bit about sync metrics, transformation runs, and errors and warnings.
Co-authored-by: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com>
PR Overview
Package version introduced in this PR:
This PR addresses the following Issue/Feature(s):
Summary of changes:
stg_fivetran_platform__connector_sdk_logto package.fivetran_platform__errors_and_warnings, that allows users to track severity levels of errors and warnings for both sdk and standard connections.fivetran_platform__transformation_run_logto the package to provide data on number of models run per transformation, whether the run succeeded/failed/partially succeeded, run duration, as well as the associated destination, connection(s), and full run log.fivetran_platform__sync_metrics model, which returns one record per completed ssync_stats log event, combining each sync's extract, process, load timing and volume statistics with its total duration and total records modified, enriched with connection and destination detailsstg_fivetran_platform__audit_trailto the package, which records user actions performed within your Fivetran account (what was changed, by whom, and how). Only available for customers on the Enterprise plan and above.fivetran_platform__audit_trail_enriched, which enriches each audit trail event with the names of the primary and secondary resources involved (resolved forCONNECTION,DESTINATION,ACCOUNT, andUSERresources) and the details of the user who performed the action. Only available for customers on the Enterprise plan and above.fivetran_platform_log_start_datevariable to limit the amount of data included in log-based models. When set to a date (YYYY-MM-DD),stg_fivetran_platform__logfilters to records on or after that date.stg_fivetran_platform__logas table.Submission Checklist
Changelog