Skip to content

Commit

Permalink
Merge artyom-new-branch to new-codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
keydunov committed Jun 13, 2024
1 parent 0dd3ae0 commit a73878a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,22 @@
# @config('context_to_api_scopes')
# def context_to_api_scopes(context: dict, default_scopes: list[str]) -> list[str]:
# return ['meta', 'data', 'graphql']

@config('semantic_layer_sync')
def sls(ctx: dict) -> list:
pat_name = os.getenv('TABLEAU_PAT_NAME_CUBEDEV', None)
pat_secret = os.getenv('TABLEAU_PAT_SECRET_CUBEDEV', None)
if pat_name and pat_secret:
return [{
"type": "tableau-cloud",
"name": "Tableau Cloud Sync",
"config": {
"database": "Cube Cloud: artyom_cube_demo",
"region": "us-west-2b",
"site": "cubedev",
"personalAccessToken": pat_name,
"personalAccessTokenSecret": pat_secret
}
}]
else:
return []

0 comments on commit a73878a

Please sign in to comment.