Skip to content

Commit

Permalink
fix: rename sync_to_cloudsql to sync_to_db (#1324)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryscheng authored Apr 30, 2024
1 parent 16cabaf commit 20be29b
Show file tree
Hide file tree
Showing 51 changed files with 54 additions and 53 deletions.
6 changes: 3 additions & 3 deletions apps/hasura/src/genTables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type ModelConfig = {
name: string;
config: {
meta: {
sync_to_cloudsql: boolean;
sync_to_db: boolean;
};
};
};
Expand Down Expand Up @@ -115,14 +115,14 @@ async function main(): Promise<void> {
name: string;
config: {
meta: {
sync_to_cloudsql: boolean;
sync_to_db: boolean;
};
};
};
modelConfigs.push(modelConfig);
}
const filteredConfigs = modelConfigs.filter((c) => {
return c.config.meta.sync_to_cloudsql === true;
return c.config.meta.sync_to_db === true;
});

const tableNames = filteredConfigs.map((c) => {
Expand Down
2 changes: 1 addition & 1 deletion warehouse/bq2cloudsql/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def table_sync_config_from_dbt_marts(target: str) -> List[TableSyncConfig]:
for model_config in model_configs:
config = model_config.get("config", {})
meta = config.get("meta", {})
if not meta.get("sync_to_cloudsql", False):
if not meta.get("sync_to_db", False):
print("Skipping %s" % model_config["name"])
continue
print(model_config["name"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
3 changes: 2 additions & 1 deletion warehouse/dbt/models/marts/directory/artifacts.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True

})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
2 changes: 1 addition & 1 deletion warehouse/dbt/models/marts/directory/collections.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
2 changes: 1 addition & 1 deletion warehouse/dbt/models/marts/directory/projects.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}
SELECT
Expand Down
2 changes: 1 addition & 1 deletion warehouse/dbt/models/marts/directory/repos_by_project.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': False
'sync_to_db': False
})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': False
'sync_to_db': False
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': False
'sync_to_db': False
})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
2 changes: 1 addition & 1 deletion warehouse/dbt/models/marts/events/event_types.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': False
'sync_to_db': False
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': False
'sync_to_db': False
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': False
'sync_to_db': False
})
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': False
'sync_to_db': False
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': False
'sync_to_db': False
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#}
{{
config(meta = {
'sync_to_cloudsql': True
'sync_to_db': True
})
}}

Expand Down
Loading

0 comments on commit 20be29b

Please sign in to comment.