Skip to content

bug: Referencing a single relation table might include other non related relation tables #18206

@erezrokah

Description

@erezrokah

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Referencing a single relation table might include other non related relation tables, e.g.

  • EntraID source plugin tables: ["entraid_group_members"] includes also entraid_group_owners, entraid_group_settings
  • AWS source plugin tables: ["aws_s3_bucket_policies"] includes also aws_s3_bucket_objects, aws_s3_bucket_object_grants , aws_s3_bucket_object_heads

Expected Behavior

  • EntraID - only entraid_group_members and entraid_groups (the parent) should be included
  • AWS - only aws_s3_bucket_policies and aws_s3_buckets (the parent) should be inclued

CloudQuery (redacted) config

kind: source
spec:
  name: "entraid"
  path: "cloudquery/entraid"
  version: "v1.1.0"
  destinations: ["postgresql"]
  tables: ["entraid_group_members"]
---
kind: source
spec:
  name: aws
  path: cloudquery/aws
  version: "v26.10.0"
  tables: ["aws_s3_bucket_policies"]
  destinations: ["postgresql"]
---
kind: destination
spec:
  name: "postgresql"
  path: "cloudquery/postgresql"
  version: "v8.0.4"
  migrate_mode: forced
  spec:
    connection_string: "postgresql://postgres:pass@localhost:5432/postgres?sslmode=disable"

Steps To Reproduce

  1. Run cloudquery migrate on the above config and see the logs/created tables

CloudQuery (redacted) logs

N/A

CloudQuery version

cloudquery version 5.20.5

Additional Context

Fixed in cloudquery/plugin-sdk#1720

Pull request (optional)

  • I can submit a pull request

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions