https://dagster.io/ logo
#ask-community
Title
# ask-community
s

Stephen Bailey

06/09/2022, 1:17 AM
i might be doing something wrong, but i tried to launch a backfill via the graphql api.
Copy code
mutation BackfillLaunch {
      launchPartitionBackfill(backfillParams: {
        selector: {
          partitionSetName: "...",
          repositorySelector: {...},
        },
        partitionNames: [
           "2022-06-08-17:00",
           "2022-06-08-18:00",
           ...
        ]
      }
    ) 
   }
When I explicilty pass in partition names as shown above, the backfill is successful and schedules tasks. If I pass in a partition selector --
partitionNames: ["2022-06-08-18:00...2022-06-08-21:00"]
, the backfill request is successful and creates a new "backfill id", but no jobs are scheduled. Might be a bug.
j

johann

06/09/2022, 3:26 PM
@Dagster Bot issue BackfillLaunch mutation doesn’t work with partition selector
❤️ 1
d

Dagster Bot

06/09/2022, 3:26 PM
p

prha

06/09/2022, 4:16 PM
Not sure if you resolved this, but there should be a
partitionStatusesOrError
field off of
partitionSet
that will give you the latest run status per partition name….
🎉 1
s

Stephen Bailey

06/09/2022, 6:46 PM
ah excellent @prha. This looks like it retrieves all partitions for a given set:
Copy code
query  {
  partitionSetOrError(
    repositorySelector: {
      repositoryName: "..."
      repositoryLocationName: "..."
    },
    partitionSetName:"..."
    ) {
    ... on PartitionSet {
        id
        partitionStatusesOrError {
          ... on PartitionStatuses {
          results {
            id
            partitionName
            runStatus
            runDuration
          }
          __typename
      }

      }
}
}
}
I still have to loop through all available partition sets, and filter out successful partitions through a script, but this i think gets me where i need to be. thanks!