announcement
product

Introducing CloudQuery's new Plaid Source Plugin

Ştefan Muraru

Ştefan Muraru

Introducing the New Plaid Source Plugin for CloudQuery #

Plaid provides a platform that allows teams to securely interact with their users' financial data, including bank accounts, transactions, and more.
Our new Plaid Source Plugin allows you to seamlessly integrate this financial data into your CloudQuery workflows and save the data where you want to persist it.
By bringing your Plaid data into your data warehouse, you can do comprehensive financial data analysis, financial reporting, and enhance your decision-making.
With our latest release, the Plaid Source Plugin supports fetching the following resources:
  • Account Balances: Retrieve current account balances into the plaid_account_balances table.
  • Wallets: Sync crypto wallet balances into the plaid_wallets table.
  • Transactions: Sync detailed transaction data into the plaid_transactions table.
  • Recurring Transactions: Fetch recurring transaction data into the plaid_recurring_transactions table.
  • Liabilities: Obtain liabilities information into the plaid_liabilities table.
  • Investments: Sync investment data from supported financial institutions into the plaid_investment_holdings and plaid_investment_transactions tables.
  • Institutions: Access information about available financial institutions into the plaid_institutions table.
 

Getting Started #

To start syncing Plaid data with CloudQuery, follow the instructions in the Plaid source plugin documentation.

Pulling Incremental Data from the Plaid Source Plugin #

To optimize data syncing, the Plaid Source Plugin supports incremental tables, ensuring that only new or updated data is fetched.
Here's an example CloudQuery configuration file to sync from Plaid to Postgres (our most popular data destination):
kind: source
spec:
  name: plaid
  path: cloudquery/plaid
  registry: cloudquery
  version: "v1.x.x"
  tables:
    - "*"
  destinations: ["postgresql"]
  backend_options:
    table_name: "cq_state_plaid"
    connection: "@@plugins.postgresql.connection"
  spec:
    client_id: "${PLAID_CLIENT_ID}"
    client_secret: "${PLAID_CLIENT_SECRET}"
    access_token: "${PLAID_ACCESS_TOKEN}"
---
kind: destination
spec:
  name: postgresql
  path: cloudquery/postgresql
  registry: cloudquery
  version: "v8.x.x"
  spec:
    connection_string: "${POSTGRES_DSN}"

Key Use Cases #

Expense Tracking #

You can combine transaction data with account information to track expenses more effectively. The following PostgreSQL query can be used to pull out all transactions with their respective account and merchant from Plaid:
SELECT
    a.account->>'name' AS account_name,
    a.account->>'account_id' AS account_id,
    t.date,
    t.name,
    t.merchant_name,
    t.amount,
    t.iso_currency_code
FROM
    plaid_transactions t
        JOIN (SELECT jsonb_array_elements(accounts) account FROM plaid_account_balances) a
    ON t.account_id = a.account->>'account_id'
ORDER BY
    t.date DESC;

Financial Forecasting #

Leverage historical transaction data to build predictive models for financial forecasting. This helps you plan your company's finances better by predicting future income and expenses. The following query will pull the total expenses grouped by month.
SELECT
    DATE_TRUNC('month', t.date::date) as month,
    SUM(t.amount) as total_spent
FROM plaid_transactions t
WHERE t.amount < 0
GROUP BY month
ORDER BY month;

Interested in syncing your financial data from Plaid to your own database but not sure how to start yet?
Need more insights on this? Join the CloudQuery Discord community to connect with other users and experts or drop us a message here!
Start your free trial today

Experience Simple, Fast and Extensible Data Movement.