Skip to content

Use returned DataManifestLocation if available#50

Merged
josevalim merged 2 commits intolivebook-dev:mainfrom
jjcarstens:fix-manifest-location
Nov 12, 2025
Merged

Use returned DataManifestLocation if available#50
josevalim merged 2 commits intolivebook-dev:mainfrom
jjcarstens:fix-manifest-location

Conversation

@jjcarstens
Copy link
Contributor

Fixes #42

In some situations, the manifest file may be a slightly different path than what is set in output_locations (reasons not fully known). This would cause failures fetching the locations of results since the manifest would not exist due to the hardcoded path.

This changes to use the DataManifestLocation key if it is returned in the results rather than assuming the path.

Sample JSON response

{
  "QueryExecution": {
    "EngineVersion": {
      "EffectiveEngineVersion": "Athena engine version 3",
      "SelectedEngineVersion": "Athena engine version 3"
    },
    "Query": "UNLOAD (SELECT count(*) FROM my_fav_table\n)\nTO 's3://aws-athena-query-results-123456789-us-east-1/livebook-2025-11-11T23:18:46.337381Z/results'\nWITH (format = 'PARQUET')",
    "QueryExecutionContext": { "Database": "my_fav_db" },
    "QueryExecutionId": "5b6d4bd6-d207-46a4-b1e3-84656c16ad5a",
    "ResultConfiguration": {
      "OutputLocation": "s3://aws-athena-query-results-123456789-us-east-1/livebook-2025-11-11T23:18:46.337381Z/5b6d4bd6-d207-46a4-b1e3-84656c16ad5a"
    },
    "ResultReuseConfiguration": {
      "ResultReuseByAgeConfiguration": { "Enabled": false }
    },
    "StatementType": "DML",
    "Statistics": {
      "DataManifestLocation": "s3://aws-athena-query-results-123456789-us-east-1/livebook-2025-11-11T23:18:46.337381Z/5b6d4bd6-d207-46a4-b1e3-84656c16ad5a-manifest.csv",
      "DataScannedInBytes": 212019779,
      "EngineExecutionTimeInMillis": 2903,
      "QueryPlanningTimeInMillis": 667,
      "QueryQueueTimeInMillis": 128,
      "ResultReuseInformation": { "ReusedPreviousResult": false },
      "ServicePreProcessingTimeInMillis": 74,
      "ServiceProcessingTimeInMillis": 43,
      "TotalExecutionTimeInMillis": 3148
    },
    "Status": {
      "CompletionDateTime": 1762903129.907,
      "State": "SUCCEEDED",
      "SubmissionDateTime": 1762903126.759
    },
    "SubstatementType": "UNLOAD",
    "WorkGroup": "primary"
  },
  "QueryExecutionDetail": {
    "OutputLocation": "s3://aws-athena-query-results-123456789-us-east-1/livebook-2025-11-11T23:18:46.337381Z/5b6d4bd6-d207-46a4-b1e3-84656c16ad5a",
    "Query": "UNLOAD (SELECT count(*) FROM my_fav_table\n)\nTO 's3://aws-athena-query-results-123456789-us-east-1/livebook-2025-11-11T23:18:46.337381Z/results'\nWITH (format = 'PARQUET')",
    "QueryExecutionContext": { "Database": "my_fav_db" },
    "QueryExecutionId": "5b6d4bd6-d207-46a4-b1e3-84656c16ad5a",
    "ResultConfiguration": {
      "OutputLocation": "s3://aws-athena-query-results-123456789-us-east-1/livebook-2025-11-11T23:18:46.337381Z/5b6d4bd6-d207-46a4-b1e3-84656c16ad5a"
    },
    "Stats": {
      "EngineExecutionTimeInMillis": 2903,
      "ProcessedBytes": 212019779,
      "ProcessedInputBytes": 2659877869,
      "ProcessedInputRows": 189833636,
      "ProcessedRows": 189833636,
      "ResultReuseInformation": { "ReusedPreviousResult": false }
    },
    "Status": {
      "CompletionDateTime": 1762903129.907,
      "State": "SUCCEEDED",
      "SubmissionDateTime": 1762903126.759
    },
    "WorkGroup": "primary"
  }
}

jjcarstens and others added 2 commits November 11, 2025 17:14
Fixes livebook-dev#42

In some situations, the manifest file may be a slightly different path than
what is set in `output_locations` (reasons not fully known). This would
cause failures fetching the locations of results since the manifest would
not exist due to the hardcoded path.

This changes to use the `DataManifestLocation` key if it is returned
in the results rather than assuming the path
@josevalim josevalim merged commit 57f8790 into livebook-dev:main Nov 12, 2025
2 checks passed
@josevalim
Copy link
Contributor

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manifests file name unreliable

2 participants