{"id":22793332,"url":"https://github.com/fivetran/dbt_social_media_reporting","last_synced_at":"2026-01-20T20:09:13.450Z","repository":{"id":43396038,"uuid":"404850626","full_name":"fivetran/dbt_social_media_reporting","owner":"fivetran","description":"Fivetran's social media reporting dbt package. Combine your Facebook Pages, Instagram Business, Twitter Organic, and LinkedIn Pages social activity using this package.","archived":false,"fork":false,"pushed_at":"2026-01-14T23:39:57.000Z","size":2151,"stargazers_count":23,"open_issues_count":6,"forks_count":10,"subscribers_count":43,"default_branch":"main","last_synced_at":"2026-01-15T02:35:31.264Z","etag":null,"topics":["dbt","dbt-packages","facebook","fivetran","instagram","linkedin","social-media","twitter"],"latest_commit_sha":null,"homepage":"https://fivetran.github.io/dbt_social_media_reporting/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fivetran.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-09T19:46:44.000Z","updated_at":"2026-01-08T22:14:30.000Z","dependencies_parsed_at":"2026-01-06T17:01:19.646Z","dependency_job_id":null,"html_url":"https://github.com/fivetran/dbt_social_media_reporting","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/fivetran/dbt_social_media_reporting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_social_media_reporting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_social_media_reporting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_social_media_reporting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_social_media_reporting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fivetran","download_url":"https://codeload.github.com/fivetran/dbt_social_media_reporting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_social_media_reporting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28612159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbt","dbt-packages","facebook","fivetran","instagram","linkedin","social-media","twitter"],"created_at":"2024-12-12T03:19:27.833Z","updated_at":"2026-01-20T20:09:13.444Z","avatar_url":"https://github.com/fivetran.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--section=\"social-media-reporting_transformation_model\"--\u003e\n# Social Media Reporting dbt Package\n\n\u003cp align=\"left\"\u003e\n    \u003ca alt=\"License\"\n        href=\"https://github.com/fivetran/dbt_social_media_reporting/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\" /\u003e\u003c/a\u003e\n    \u003ca alt=\"dbt-core\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/dbt_Core™_version-\u003e=1.3.0,_\u003c3.0.0-orange.svg\" /\u003e\u003c/a\u003e\n    \u003ca alt=\"Maintained?\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" /\u003e\u003c/a\u003e\n    \u003ca alt=\"PRs\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Contributions-welcome-blueviolet\" /\u003e\u003c/a\u003e\n    \u003ca alt=\"Fivetran Quickstart Compatible\"\n        href=\"https://fivetran.com/docs/transformations/data-models/quickstart-management#quickstartmanagement/quickstart\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Fivetran_Quickstart_Compatible%3F-yes-green.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis dbt package transforms data from Fivetran's Social Media Reporting connector into analytics-ready tables.\n\n## Resources\n\n- Number of materialized models¹: 6\n- Connector documentation\n  - [Facebook Pages connector documentation](https://fivetran.com/docs/connectors/applications/facebook-pages)\n  - [Instagram Business connector documentation](https://fivetran.com/docs/connectors/applications/instagram-business)\n  - [Twitter Organic connector documentation](https://fivetran.com/docs/connectors/applications/twitter)\n  - [Linkedin Pages connector documentation](https://fivetran.com/docs/connectors/applications/linkedin-company-pages)\n  - [Youtube Analytics connector documentation](https://fivetran.com/docs/connectors/applications/youtube-analytics)\n- dbt package documentation\n  - [GitHub repository](https://github.com/fivetran/dbt_social_media_reporting)\n  - [dbt Docs](https://fivetran.github.io/dbt_social_media_reporting/#!/overview)\n  - [DAG](https://fivetran.github.io/dbt_social_media_reporting/#!/overview?g_v=1)\n  - [Changelog](https://github.com/fivetran/dbt_social_media_reporting/blob/main/CHANGELOG.md)\n\n## What does this dbt package do?\nThis package enables you to aggregate and model data from multiple Fivetran social media connections, standardize schemas from various social media connections, and analyze post performance by clicks, impressions, shares, likes, and comments. It creates enriched models with metrics focused on unified social media reporting across platforms.\n\nCurrently, this package supports the following social media connector types:\n  - [Facebook Pages](https://github.com/fivetran/dbt_facebook_pages)\n  - [Instagram Business](https://github.com/fivetran/dbt_instagram_business)\n  - [LinkedIn Company Pages](https://github.com/fivetran/dbt_linkedin_pages)\n  - [Twitter Organic](https://github.com/fivetran/dbt_twitter_organic)\n  - [Youtube Analytics](https://github.com/fivetran/dbt_youtube_analytics)\n\u003e NOTE: You do _not_ need to have all of these connector types to use this package, though you should have at least two.\n\n### Output schema\nFinal output tables are generated in the following target schema:\n\n```\n\u003cyour_database\u003e.\u003cconnector/schema_name\u003e_social_media_reporting\n```\n\n### Final output tables\n\nBy default, this package materializes the following final tables:\n\n| Table | Description |\n| :---- | :---- |\n| [social_media_reporting__rollup_report](https://fivetran.github.io/dbt_social_media_reporting/#!/model/model.social_media_reporting.social_media_reporting__rollup_report) | Consolidates post performance across multiple social media platforms (Facebook, Instagram, LinkedIn, Twitter, and YouTube Analytics) to compare engagement, reach, and content effectiveness in one unified view. \u003cbr\u003e\u003c/br\u003e**Example Analytics Questions:**\u003cul\u003e\u003cli\u003eWhich social media platform drives the highest engagement and reach for your content?\u003c/li\u003e\u003cli\u003eHow does content performance compare across different platforms and account types?\u003c/li\u003e\u003cli\u003eWhat posting strategies work best across your entire social media presence?\u003c/li\u003e\u003c/ul\u003e|\n\n### Materialized Models\nEach Quickstart transformation job run materializes the following model counts for each selected connector. The total model count represents all staging, intermediate, and final models, materialized as `view`, `table`, or `incremental`:\n\n| **Connector** | **Model Count** |\n| ------------- | --------------- |\n| Social Media Reporting | 6 |\n| [Facebook Pages](https://github.com/fivetran/dbt_facebook_pages) | 11 |\n| [Instagram Business](https://github.com/fivetran/dbt_instagram_business) | 7 |\n| [LinkedIn Company Pages](https://github.com/fivetran/dbt_linkedin_pages) | 15 |\n| [Twitter Organic](https://github.com/fivetran/dbt_twitter_organic) | 11 |\n| [Youtube Analytics](https://github.com/fivetran/dbt_youtube_analytics) | 11 |\n\n¹ Each Quickstart transformation job run materializes these models if all components of this data model are enabled. This count includes all staging, intermediate, and final models materialized as `view`, `table`, or `incremental`.\n---\n\n## Prerequisites\nTo use this dbt package, you must have the following:\n\n- At least one Fivetran Social Media Reporting connection syncing data into your destination.\n- A BigQuery, Snowflake, Redshift, Postgres, or Databricks destination.\n\n**Connector**: Have at least one of the below supported Fivetran ad platform connections syncing data into your destination. This package currently supports:\n- [Facebook Pages](https://fivetran.com/docs/connectors/applications/facebook-pages)\n- [Instagram Business](https://fivetran.com/docs/connectors/applications/instagram-business)\n- [LinkedIn Company Pages](https://fivetran.com/docs/connectors/applications/linkedin-company-pages)\n- [Twitter Organic](https://fivetran.com/docs/connectors/applications/twitter)\n- [Youtube Analytics](https://fivetran.com/docs/connectors/applications/youtube-analytics)\n\n\u003e While you need only one of the above connections to utilize this package, we recommend having at least two to gain the rollup benefit of this package.\n\n\u003c!--section-end--\u003e\n\n## How do I use the dbt package?\nYou can either add this dbt package in the Fivetran dashboard or import it into your dbt project:\n\n- To add the package in the Fivetran dashboard, follow our [Quickstart guide](https://fivetran.com/docs/transformations/data-models/quickstart-management#quickstartmanagement).\n- To add the package to your dbt project, follow the setup instructions in the dbt package's [README file](https://github.com/fivetran/dbt_social_media_reporting/blob/main/README.md#how-do-i-use-the-dbt-package) to use this package.\n\n### Installing the Package\nInclude the following github package version in your `packages.yml`\n\u003e Check [dbt Hub](https://hub.getdbt.com/) for the latest installation instructions, or [read the dbt docs](https://docs.getdbt.com/docs/package-management) for more information on installing packages.\n```yaml\npackages:\n  - package: fivetran/social_media_reporting\n    version: [\"\u003e=1.4.0\", \"\u003c1.5.0\"] # we recommend using ranges to capture non-breaking changes automatically\n```\nDo NOT include the upstream social media packages in this file. The transformation package itself has a dependency on it and will install the upstream packages as well.\n\nDo NOT include the individual social media packages in this file. This package has dependencies on the packages and will install them as well.\n\n#### Databricks Dispatch Configuration\nIf you are using a Databricks destination with this package you will need to add the below (or a variation of the below) dispatch configuration within your `dbt_project.yml`. This is required in order for the package to accurately search for macros within the `dbt-labs/spark_utils` then the `dbt-labs/dbt_utils` packages respectively.\n```yml\ndispatch:\n  - macro_namespace: dbt_utils\n    search_order: ['spark_utils', 'dbt_utils']\n```\n\n### Configure Database and Schema Variables\nBy default, this package looks for your social media reporting data in your target database. If this is not where your app platform data is stored, add the relevant `\u003cconnection\u003e_database` variables to your `dbt_project.yml` file (see below).\n\n```yml\nvars:\n    ##Facebook Pages schema and database variables\n    facebook_pages_schema: facebook_pages_schema\n    facebook_pages_database: facebook_pages_database\n\n    ##Instagram Business schema and database variables\n    instagram_business_schema: instagram_business_schema\n    instagram_business_database: instagram_business_database\n\n    ##LinkedIn Pages schema and database variables\n    linkedin_pages_schema: linkedin_pages_schema\n    linkedin_pages_database: linkedin_pages_database\n\n    ##Twitter Organic schema and database variables\n    twitter_organic_schema: twitter_organic_schema\n    twitter_organic_database: twitter_organic_database\n\n    ##Youtube Analytics schema and database variables\n    youtube_analytics_schema: youtube_analytics_schema\n    youtube_analytics_database: youtube_analytics_database\n```\n\n#### Change the source table references\nIf an individual source table has a different name than the package expects, add the table name as it appears in your destination to the respective variable:\n\u003e IMPORTANT: See the Facebook Pages [`dbt_project.yml`](https://github.com/fivetran/dbt_facebook_pages/blob/main/dbt_project.yml), Instagram Business [`dbt_project.yml`](https://github.com/fivetran/dbt_instagram_business/blob/main/dbt_project.yml), LinkedIn Company Pages [`dbt_project.yml`](https://github.com/fivetran/dbt_linkedin_pages/blob/main/dbt_project.yml), Twitter Organic [`dbt_project.yml`](https://github.com/fivetran/dbt_twitter_organic/blob/main/dbt_project.yml), and Youtube Analytics [`dbt_project.yml`](https://github.com/fivetran/dbt_youtube_analytics/blob/main/dbt_project.yml) variable declarations to see the expected names.\n\n```yml\nvars:\n    \u003cdefault_source_table_name\u003e_identifier: your_table_name \n```\n\n### Enabling/Disabling Models\nThe package assumes that all connector models are enabled, so it will look to pull data from all of the connections [listed above](https://github.com/fivetran/dbt_social_media_reporting#social-media-reporting). If you don't want to use certain connections, disable those connections' models in this package by setting the relevant variables to `false`:\n\n```yml\nvars:\n    social_media_rollup__twitter_enabled: False\n    social_media_rollup__facebook_enabled: False\n    social_media_rollup__linkedin_enabled: False\n    social_media_rollup__instagram_enabled: False\n    social_media_rollup__youtube_enabled: False\n```\n\nNext, you must disable the models in the unwanted connection's related package, which has its own configuration. Disable the relevant models under the models section of your `dbt_project.yml` file by setting the `enabled` value to `false`.\n\n_Only include the models you want to disable.  Default values are generally `true` but that is not always the case._\n\n```yml\nmodels:\n    # disable instagram business models if not using instagram business\n    instagram_business:\n        +enabled: false\n\n    # disable linkedin company pages models if not using linkedin company pages\n    linkedin_pages:\n        +enabled: false\n\n    # disable twitter organic models if not using twitter organic\n    twitter_organic:\n        +enabled: false\n\n    # disable facebook pages models if not using facebook pages\n    facebook_pages:\n        +enabled: false\n\n    # disable youtube analytics models if not using youtube analytics\n    youtube_analytics:\n        +enabled: false\n```\n\n### (Optional) Additional configurations\n#### Unioning Multiple Social Media Connections\nIf you have multiple social media connections in Fivetran, you can use this package on all of them simultaneously. The package will union all of the data together and then pass the unioned table(s) into the reporting model. You will be able to see which source the data came from in the `source_relation` column of each model. To use this functionality, you will need to set either the `union_schemas` or `union_databases` variables:\n\n\u003e IMPORTANT: You _cannot_ use both the `union_schemas` and `union_databases` variables.\n\n```yml\nvars:\n    ##Schemas variables\n    facebook_pages_union_schemas: ['facebook_pages_one','facebook_pages_two']\n    linkedin_pages_union_schemas: ['linkedin_company_pages_one', 'linkedin_company_pages_two']\n    instagram_business_union_schemas: ['instagram_business_one', 'instagram_business_two', 'instagram_business_three']\n    twitter_organic_union_schemas: ['twitter_social_one', 'twitter_social_two', 'twitter_social_three', 'twitter_social_four']\n    youtube_analytics_union_schemas: ['youtube_analytics_one','youtube_analytics_two']\n\n    ##Databases variables\n    facebook_pages_union_databases: ['facebook_pages_one','facebook_pages_two']\n    linkedin_pages_union_databases: ['linkedin_company_pages_one', 'linkedin_company_pages_two']\n    instagram_business_union_databases: ['instagram_business_one', 'instagram_business_two', 'instagram_business_three']\n    twitter_organic_union_databases: ['twitter_social_one', 'twitter_social_two', 'twitter_social_three', 'twitter_social_four']\n    youtube_analytics_union_databases: ['youtube_analytics_one','youtube_analytics_two']\n```\nFor more configuration information, see the individual connector dbt packages ([listed above](https://github.com/fivetran/dbt_social_media_reporting#social-media-reporting)).\n\n## Does this package have dependencies?\nThis dbt package is dependent on the following dbt packages. These dependencies are installed by default within this package. For more information on the following packages, refer to the [dbt hub](https://hub.getdbt.com/) site.\n\u003e IMPORTANT: If you have any of these dependent packages in your own `packages.yml` file, we highly recommend that you remove them from your root `packages.yml` to avoid package version conflicts.\n```yml\npackages:\n    - package: fivetran/facebook_pages\n      version: [\"\u003e=1.2.0\", \"\u003c1.3.0\"]\n\n    - package: fivetran/instagram_business\n      version: [\"\u003e=1.1.0\", \"\u003c1.2.0\"]\n\n    - package: fivetran/twitter_organic\n      version: [\"\u003e=1.1.0\", \"\u003c1.2.0\"]\n\n    - package: fivetran/linkedin_pages\n      version: [\"\u003e=1.1.0\", \"\u003c1.2.0\"]\n\n    - package: fivetran/youtube_analytics\n      version: [\"\u003e=1.1.0\", \"\u003c1.2.0\"]\n\n    - package: fivetran/fivetran_utils\n      version: [\"\u003e=0.4.0\", \"\u003c0.5.0\"]\n\n    - package: dbt-labs/dbt_utils\n      version: [\"\u003e=1.0.0\", \"\u003c2.0.0\"]\n\n    - package: dbt-labs/spark_utils\n      version: [\"\u003e=0.3.0\", \"\u003c0.4.0\"]\n```\n\n\u003c!--section=\"social-media-reporting_maintenance\"--\u003e\n## How is this package maintained and can I contribute?\n\n### Package Maintenance\nThe Fivetran team maintaining this package only maintains the [latest version](https://hub.getdbt.com/fivetran/social_media_reporting/latest/) of the package. We highly recommend you stay consistent with the latest version of the package and refer to the [CHANGELOG](https://github.com/fivetran/dbt_social_media_reporting/blob/main/CHANGELOG.md) and release notes for more information on changes across versions.\n\n### Contributions\nA small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions.\n\nWe highly encourage and welcome contributions to this package. Learn how to contribute to a package in dbt's [Contributing to an external dbt package article](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657).\n\n\u003c!--section-end--\u003e\n\n## Are there any resources available?\n- If you encounter any questions or want to reach out for help, see the [GitHub Issue](https://github.com/fivetran/dbt_social_media_reporting/issues/new/choose) section to find the right avenue of support for you.\n- If you would like to provide feedback to the dbt package team at Fivetran, or would like to request a future dbt package to be developed, then feel free to fill out our [Feedback Form](https://www.surveymonkey.com/r/DQ7K7WW).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffivetran%2Fdbt_social_media_reporting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffivetran%2Fdbt_social_media_reporting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffivetran%2Fdbt_social_media_reporting/lists"}