Closed bojanstavrikj closed 2 months ago
I found a way to do it, by looking at the graphql query that is sent when doing the same through the dagster UI.
Based on that the following solution works:
query = """mutation LaunchPipelineExecution($executionParams: ExecutionParams!) {
launchPipelineExecution(executionParams: $executionParams) {
... on LaunchRunSuccess {
run {
id
pipelineName
__typename
}
__typename
}
... on PipelineNotFoundError {
message
__typename
}
... on InvalidSubsetError {
message
__typename
}
... on RunConfigValidationInvalid {
errors {
message
__typename
}
__typename
}
...PythonErrorFragment
__typename
}
}
fragment PythonErrorFragment on PythonError {
message
stack
errorChain {
...PythonErrorChain
__typename
}
__typename
}
fragment PythonErrorChain on ErrorChainLink {
isExplicitLink
error {
message
stack
__typename
}
__typename
}"""
Then you need to pass in the variables to the function like this:
variables = {
"executionParams": {
"selector": {
"jobName":"yourJobName",
"repositoryName": "yourRepoName",
"repositoryLocationName": "yourRepoLocName",
"assetSelection": [
{
"path": [
"yourAssetName"
]
}
],
"assetCheckSelection": []
},
"runConfigData": "ops:\n yourAssetName:\n ops:\n yourOpName:\n inputs:\n input1: '1'\n input2: '2'\n input3: 3",
"mode": "default",
"executionMetadata": {
"tags": [
{
"key": "dagster/partition",
"value": "Feb2024"
}
]
}
}
}
What's the use case?
Hello
I have an asset with a static partition, which has a graph of op's that run sequentially.
I am trying to run it through graphQL using launchPartitionBackfill. I manage to run it if I remove the variable input from op2. When it is in, I don't find a way to send in the inputs through config.The graphQL code I use is the following:
I want to pass something like this:
I cannot find anything in the documentation or online. Is there any way to pass this already? If not possible, my other option will be to add some business logic to the partitions, then fetch the inputs I need from the database based on the partition key. Thanks in advance!
Ideas of implementation
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.