This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
postgres: | |
container_name: iot-online-shop-postgres | |
image: postgres:latest | |
ports: | |
- "5432:5432" | |
volumes: | |
- /var/lib/postgresql/data | |
env_file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table users | |
( | |
id serial not null, | |
first_name varchar, | |
last_name varchar, | |
city varchar, | |
age numeric, | |
gender varchar, | |
primary key (id) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl http://localhost:3000/api/entities/dataSources \ | |
-H "Content-Type: application/vnd.gooddata.api+json" \ | |
-H "Accept: application/vnd.gooddata.api+json" \ | |
-H "Authorization: Bearer YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz" \ | |
-X POST \ | |
-d '{ | |
"data": { | |
"attributes": { | |
"name":"iot-online-shop-postgres", | |
"url": "jdbc:postgresql://postgres:5432/iot-online-shop-production", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { InsightView } from "@gooddata/sdk-ui-ext"; | |
import Page from "../components/Page"; | |
import { Insights } from "../md/full"; | |
const Home = () => { | |
return ( | |
<Page> | |
<h1>Short term analysis</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df.loc[1, 'Age'] = 24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gooddata_sdk | |
from gooddata_sdk.catalog.workspace.entity_model.workspace import CatalogWorkspace | |
import os | |
host = os.getenv('GOODDATA_HOST') | |
token = os.getenv('GOODDATA_API_TOKEN') | |
staging_workspace_id = os.getenv('GOODDATA_STAGING_WORKSPACE_ID') | |
production_workspace_id = os.getenv('GOODDATA_PRODUCTION_WORKSPACE_ID') | |
sdk = gooddata_sdk.GoodDataSdk.create(host, token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --location --request POST \ 'https://cicd.anywhere.gooddata.com/api/entities/workspaces' \ | |
--header 'Authorization: <Bearer API Token>' \ | |
--header 'Content-Type: application/vnd.gooddata.api+json' \ | |
--data-raw '{ | |
"data": { | |
"attributes": { | |
"name": "staging" | |
}, | |
"id": "staging", | |
"type": "workspace" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pipeline | |
import ( | |
"dagger.io/dagger" | |
"universe.dagger.io/docker" | |
) | |
#StagingToProductionDeploy: docker.#Dockerfile & { | |
dockerfile: contents: """ | |
FROM python:3.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gooddata_sdk | |
from gooddata_sdk.catalog.workspace.entity_model.workspace import CatalogWorkspace | |
host = <GOODDATA_HOST> | |
token = <GOODDATA_API_TOKEN> | |
workspace = "new_workspace" | |
sdk = gooddata_sdk.GoodDataSdk.create(host, token) | |
sdk.catalog_workspace.create_or_update(CatalogWorkspace(workspace, workspace)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_pages(self, org: str, repo: str, table: Table): | |
endpoint = self.get_endpoint(org, repo, table) | |
self.logger.info(f'get_pages endpoint={endpoint}') | |
page = 1 | |
params = self.get_params(page, table) | |
result = [] | |
batch = self.rest_api.get(endpoint, params=params).json() | |
result.extend(batch) | |
while batch: | |
self.logger.info(f'get_pages endpoint={endpoint} done={len(result)}') |
OlderNewer