mirror of https://github.com/databricks/cli.git
Add acceptance tests for Schema depenendency auto-detection
This commit is contained in:
parent
fa43a4de38
commit
c0d3c4fbbf
|
@ -0,0 +1,43 @@
|
|||
bundle:
|
||||
name: dlt-schema-field-dep-on-uc-schema
|
||||
|
||||
resources:
|
||||
schemas:
|
||||
schema1:
|
||||
catalog_name: catalog1
|
||||
name: foobar
|
||||
|
||||
schema2:
|
||||
catalog_name: catalog2
|
||||
name: foobar
|
||||
|
||||
schema3:
|
||||
catalog_name: catalog1
|
||||
name: barfoo
|
||||
|
||||
pipelines:
|
||||
pipeline1:
|
||||
catalog: catalog1
|
||||
schema: foobar
|
||||
|
||||
pipeline2:
|
||||
catalog: catalog2
|
||||
schema: foobar
|
||||
|
||||
pipeline3:
|
||||
catalog: catalog1
|
||||
schema: barfoo
|
||||
|
||||
pipeline4:
|
||||
catalog: catalogX
|
||||
schema: foobar
|
||||
|
||||
pipeline5:
|
||||
catalog: catalog1
|
||||
schema: schemaX
|
||||
|
||||
pipeline6:
|
||||
schema: foobar
|
||||
|
||||
pipeline7:
|
||||
name: whatever
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"pipeline1": {
|
||||
"catalog": "catalog1",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"schema": "${resources.schemas.schema1.name}"
|
||||
},
|
||||
"pipeline2": {
|
||||
"catalog": "catalog2",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"schema": "${resources.schemas.schema2.name}"
|
||||
},
|
||||
"pipeline3": {
|
||||
"catalog": "catalog1",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"schema": "${resources.schemas.schema3.name}"
|
||||
},
|
||||
"pipeline4": {
|
||||
"catalog": "catalogX",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"schema": "foobar"
|
||||
},
|
||||
"pipeline5": {
|
||||
"catalog": "catalog1",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"schema": "schemaX"
|
||||
},
|
||||
"pipeline6": {
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"schema": "foobar"
|
||||
},
|
||||
"pipeline7": {
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"name": "whatever",
|
||||
"permissions": []
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
$CLI bundle validate -o json | jq .resources.pipelines > out.json
|
|
@ -0,0 +1,43 @@
|
|||
bundle:
|
||||
name: dlt-schema-field-dep-on-uc-schema
|
||||
|
||||
resources:
|
||||
schemas:
|
||||
schema1:
|
||||
catalog_name: catalog1
|
||||
name: foobar
|
||||
|
||||
schema2:
|
||||
catalog_name: catalog2
|
||||
name: foobar
|
||||
|
||||
schema3:
|
||||
catalog_name: catalog1
|
||||
name: barfoo
|
||||
|
||||
pipelines:
|
||||
pipeline1:
|
||||
catalog: catalog1
|
||||
target: foobar
|
||||
|
||||
pipeline2:
|
||||
catalog: catalog2
|
||||
target: foobar
|
||||
|
||||
pipeline3:
|
||||
catalog: catalog1
|
||||
target: barfoo
|
||||
|
||||
pipeline4:
|
||||
catalog: catalogX
|
||||
target: foobar
|
||||
|
||||
pipeline5:
|
||||
catalog: catalog1
|
||||
target: schemaX
|
||||
|
||||
pipeline6:
|
||||
target: foobar
|
||||
|
||||
pipeline7:
|
||||
name: whatever
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"pipeline1": {
|
||||
"catalog": "catalog1",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"target": "${resources.schemas.schema1.name}"
|
||||
},
|
||||
"pipeline2": {
|
||||
"catalog": "catalog2",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"target": "${resources.schemas.schema2.name}"
|
||||
},
|
||||
"pipeline3": {
|
||||
"catalog": "catalog1",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"target": "${resources.schemas.schema3.name}"
|
||||
},
|
||||
"pipeline4": {
|
||||
"catalog": "catalogX",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"target": "foobar"
|
||||
},
|
||||
"pipeline5": {
|
||||
"catalog": "catalog1",
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"target": "schemaX"
|
||||
},
|
||||
"pipeline6": {
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"permissions": [],
|
||||
"target": "foobar"
|
||||
},
|
||||
"pipeline7": {
|
||||
"deployment": {
|
||||
"kind": "BUNDLE",
|
||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/dlt-schema-field-dep-on-uc-schema/default/state/metadata.json"
|
||||
},
|
||||
"name": "whatever",
|
||||
"permissions": []
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
$CLI bundle validate -o json | jq .resources.pipelines > out.json
|
|
@ -0,0 +1,37 @@
|
|||
bundle:
|
||||
name: volume-deps-on-schema
|
||||
|
||||
resources:
|
||||
schemas:
|
||||
schema1:
|
||||
catalog_name: catalog1
|
||||
name: foobar
|
||||
|
||||
schema2:
|
||||
catalog_name: catalog2
|
||||
name: foobar
|
||||
|
||||
schema3:
|
||||
catalog_name: catalog1
|
||||
name: barfoo
|
||||
|
||||
volumes:
|
||||
volume1:
|
||||
catalog_name: catalog1
|
||||
schema_name: ${resources.schemas.schema1.name}
|
||||
|
||||
volume2:
|
||||
catalog_name: catalog2
|
||||
schema_name: ${resources.schemas.schema2.name}
|
||||
|
||||
volume3:
|
||||
catalog_name: catalog1
|
||||
schema_name: ${resources.schemas.schema3.name}
|
||||
|
||||
volume4:
|
||||
catalog_name: catalogX
|
||||
schema_name: foobar
|
||||
|
||||
volume5:
|
||||
catalog_name: catalog1
|
||||
schema_name: schemaX
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"volume1": {
|
||||
"catalog_name": "catalog1",
|
||||
"schema_name": "${resources.schemas.schema1.name}",
|
||||
"volume_type": "MANAGED"
|
||||
},
|
||||
"volume2": {
|
||||
"catalog_name": "catalog2",
|
||||
"schema_name": "${resources.schemas.schema2.name}",
|
||||
"volume_type": "MANAGED"
|
||||
},
|
||||
"volume3": {
|
||||
"catalog_name": "catalog1",
|
||||
"schema_name": "${resources.schemas.schema3.name}",
|
||||
"volume_type": "MANAGED"
|
||||
},
|
||||
"volume4": {
|
||||
"catalog_name": "catalogX",
|
||||
"schema_name": "foobar",
|
||||
"volume_type": "MANAGED"
|
||||
},
|
||||
"volume5": {
|
||||
"catalog_name": "catalog1",
|
||||
"schema_name": "schemaX",
|
||||
"volume_type": "MANAGED"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
$CLI bundle validate -o json | jq .resources.volumes > out.json
|
Loading…
Reference in New Issue