Skip to content

gcp-spark: Resolve Iceberg targets for Spark SQL query files. - #572

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1024736179
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1024736179

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

gcp-spark: Resolve Iceberg targets for Spark SQL query files.

Spark SQL query files that start with a @datacloud.settings header run on a
Managed Spark session created from the Runtime Profile in
connectionInfo.sessionTemplate. The skill only described Runtime Profile
catalog lookup for notebooks, so agents could write placeholder identifiers,
duplicate the header inside statements, or pick arbitrary namespaces.

  • SKILL.md: rules for @datacloud.settings Spark SQL files: keep one header at
    the top, resolve the catalog from the Runtime Profile, create new tables in
    the profile's default catalog and namespace, read BigQuery through a
    USING bigquery temporary view, never modify Runtime Profiles without
    confirmation, and report BigLake permission errors instead of switching
    namespace or catalog.
  • references/biglake_iceberg.md: Option A and Case 1 cover Spark SQL files;
    new "Target for new tables" rule (spark.sql.defaultCatalog -> bare table
    name, otherwise <catalog>.<default-namespace or default>.<table>); Case 3
    covers profiles without an Iceberg catalog; new "Permission Errors" section;
    CREATE NAMESPACE only for namespaces the user names.
  • Bump gcp-spark to v36.
Spark SQL query files that start with a `@datacloud.settings` header run on a
Managed Spark session created from the Runtime Profile in
`connectionInfo.sessionTemplate`. The skill only described Runtime Profile
catalog lookup for notebooks, so agents could write placeholder identifiers,
duplicate the header inside statements, or pick arbitrary namespaces.

- SKILL.md: rules for `@datacloud.settings` Spark SQL files: keep one header at
  the top, resolve the catalog from the Runtime Profile, create new tables in
  the profile's default catalog and namespace, read BigQuery through a
  `USING bigquery` temporary view, never modify Runtime Profiles without
  confirmation, and report BigLake permission errors instead of switching
  namespace or catalog.
- references/biglake_iceberg.md: Option A and Case 1 cover Spark SQL files;
  new "Target for new tables" rule (`spark.sql.defaultCatalog` -> bare table
  name, otherwise `<catalog>.<default-namespace or default>.<table>`); Case 3
  covers profiles without an Iceberg catalog; new "Permission Errors" section;
  CREATE NAMESPACE only for namespaces the user names.
- Bump gcp-spark to v36.

PiperOrigin-RevId: 1024736179
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant