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

Stephen Bailey

05/19/2022, 8:18 PM
am i able to use the dagster cli, e.g. to submit backfills, with dagster cloud instances? if so, how do i set up connectivity?
🤖 1
d

daniel

05/19/2022, 8:40 PM
I think your best bet for this right now in cloud is to use the GraphQL API - there's a launchPartitionBackfill mutation that you can launch from the GraphQL playground in Dagit or by making a request against the graphql server. Happy to help get the parameters for that configured.
👍 1
s

Stephen Bailey

05/19/2022, 11:58 PM
actually, it would be amazing if i could get a template for launching a backfill via graphql that amounts to. I am a pretty big graphql newbie:
Copy code
dagster job backfill --job my_job --from 2021-04-01:00 --to 2021-05-01:00
d

daniel

05/20/2022, 12:43 AM
Bah, I think we will need to add the
from
and
to
args to the graphql endpoint - the CLI command currently turns those into a list of partitions for you, but. it shouldn't be hard to move that same logic to the graphql server
Here's an example graphql call (my 'bah' was prompted by realizing that you either have to list all the partition names manually, or set
allPartitions
to True which does them all:
Copy code
mutation BackfillLaunch {
  launchPartitionBackfill(backfillParams: {
    selector: {
      partitionSetName: "hacker_news_api_download_partition_set",
      repositorySelector: {
        repositoryName:"hacker_news_prod",
        repositoryLocationName:"hacker-news"
      },
    },
    partitionNames: ["2022-05-18-21:00"]
  }
  ) {
    __typename
    ... on PythonError {
      message
    }
  }
}
❤️ 1
s

Stephen Bailey

05/20/2022, 1:08 AM
thank you!