You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: migration-tools/Cortex_Code_Skill/dcm-migrate/SKILL.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,14 +168,19 @@ Collect from the user:
168
168
- Ask for the project identifier (`DB.SCHEMA.PROJECT_NAME`)
169
169
- The project's parent DB and schema CANNOT be defined inside the project itself
170
170
- Ask if multi-environment templating is needed
171
+
-**Fetch the current account identifier** from the active session before writing the manifest. Run:
172
+
```sql
173
+
SELECT CURRENT_ORGANIZATION_NAME() ||'-'|| CURRENT_ACCOUNT_NAME() AS ACCOUNT_IDENTIFIER
174
+
```
175
+
Use the returned value as `account_identifier` for the target matching the current connection (typically `DEV`). For additional targets that point to other accounts (e.g. `PROD`), leave a placeholder like `<PROD_ORG>-<PROD_ACCOUNT>` and tell the user to fill it in.
171
176
- Create local directory structure:
172
177
```
173
178
<project_dir>/
174
179
├── manifest.yml
175
180
└── sources/
176
181
└── definitions/
177
182
```
178
-
- Create `manifest.yml` using this template:
183
+
- Create `manifest.yml` using this template (substitute `<ACCOUNT_IDENTIFIER>` with the value fetched above):
179
184
180
185
**Minimal manifest (no templating):**
181
186
```yaml
@@ -185,6 +190,7 @@ Collect from the user:
185
190
186
191
targets:
187
192
DEV:
193
+
account_identifier: '<ACCOUNT_IDENTIFIER>'# from CURRENT_ORGANIZATION_NAME() || '-' || CURRENT_ACCOUNT_NAME()
188
194
project_name: 'DB_NAME.SCHEMA_NAME.PROJECT_NAME'
189
195
project_owner: DCM_DEVELOPER
190
196
```
@@ -197,10 +203,12 @@ Collect from the user:
197
203
198
204
targets:
199
205
DEV:
206
+
account_identifier: '<ACCOUNT_IDENTIFIER>'# current session
0 commit comments