tinybird 0.0.1.dev270__tar.gz → 0.0.1.dev272__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tinybird might be problematic. Click here for more details.
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/client.py +4 -23
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/connection.py +1 -1
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/pull.py +1 -1
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/deployment.py +82 -2
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/deployment_common.py +4 -3
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/setup.cfg +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/datafile/common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/__init__.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/agent.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/animations.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/banner.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/command_agent.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/compactor.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/explore_agent.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/memory.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/models.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/prompts.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/testing_agent.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/__init__.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/analyze.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/append.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/build.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/create_datafile.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/deploy.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/deploy_check.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/diff_resource.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/execute_query.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/get_endpoint_stats.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/get_openapi_definition.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/mock.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/plan.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/request_endpoint.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/run_command.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/secret.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/test.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/utils.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/build_common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/login_common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/mock_common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/secret_common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/test_common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/forward/commands'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev272'
|
|
8
|
+
__revision__ = '6fc56e0'
|
|
@@ -300,13 +300,10 @@ class TinyB:
|
|
|
300
300
|
response = self._req(f"/v0/connectors?{urlencode(params)}")
|
|
301
301
|
return response["connectors"]
|
|
302
302
|
|
|
303
|
-
def connections(self, connector: Optional[str] = None
|
|
303
|
+
def connections(self, connector: Optional[str] = None):
|
|
304
304
|
response = self._req("/v0/connectors")
|
|
305
305
|
connectors = response["connectors"]
|
|
306
|
-
|
|
307
|
-
if not skip_bigquery:
|
|
308
|
-
bigquery_connection = self.bigquery_connection() if connector == "bigquery" or connector is None else None
|
|
309
|
-
connectors = [*connectors, bigquery_connection] if bigquery_connection else connectors
|
|
306
|
+
|
|
310
307
|
if connector:
|
|
311
308
|
return [
|
|
312
309
|
{
|
|
@@ -328,24 +325,9 @@ class TinyB:
|
|
|
328
325
|
**c["settings"],
|
|
329
326
|
}
|
|
330
327
|
for c in connectors
|
|
328
|
+
if c["service"] != "gcscheduler"
|
|
331
329
|
]
|
|
332
330
|
|
|
333
|
-
def bigquery_connection(self):
|
|
334
|
-
bigquery_resources = self.list_gcp_resources()
|
|
335
|
-
if len(bigquery_resources) == 0:
|
|
336
|
-
return None
|
|
337
|
-
|
|
338
|
-
gcp_account_details: Dict[str, Any] = self.get_gcp_service_account_details()
|
|
339
|
-
datasources = self.datasources()
|
|
340
|
-
bigquery_datasources = [ds["name"] for ds in datasources if ds["type"] == "bigquery"]
|
|
341
|
-
return {
|
|
342
|
-
"id": gcp_account_details["account"].split("@")[0],
|
|
343
|
-
"service": "bigquery",
|
|
344
|
-
"name": "bigquery",
|
|
345
|
-
"linkers": bigquery_datasources,
|
|
346
|
-
"settings": gcp_account_details,
|
|
347
|
-
}
|
|
348
|
-
|
|
349
331
|
def get_datasource(self, ds_name: str, used_by: bool = False) -> Dict[str, Any]:
|
|
350
332
|
params = {
|
|
351
333
|
"attrs": "used_by" if used_by else "",
|
|
@@ -1037,10 +1019,9 @@ class TinyB:
|
|
|
1037
1019
|
name_or_id: str,
|
|
1038
1020
|
service: Optional[str] = None,
|
|
1039
1021
|
key: Optional[str] = "name",
|
|
1040
|
-
skip_bigquery: Optional[bool] = False,
|
|
1041
1022
|
) -> Optional[Dict[str, Any]]:
|
|
1042
1023
|
return next(
|
|
1043
|
-
(c for c in self.connections(connector=service
|
|
1024
|
+
(c for c in self.connections(connector=service) if c[key] == name_or_id),
|
|
1044
1025
|
None,
|
|
1045
1026
|
)
|
|
1046
1027
|
|
|
@@ -121,7 +121,7 @@ def connection_ls(ctx: Context, service: Optional[DataConnectorType] = None) ->
|
|
|
121
121
|
obj: Dict[str, Any] = ctx.ensure_object(dict)
|
|
122
122
|
client: TinyB = obj["client"]
|
|
123
123
|
|
|
124
|
-
connections = client.connections(connector=service
|
|
124
|
+
connections = client.connections(connector=service)
|
|
125
125
|
columns = []
|
|
126
126
|
table = []
|
|
127
127
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import logging
|
|
3
|
-
from datetime import datetime
|
|
3
|
+
from datetime import datetime, timedelta, timezone
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import Any, Dict, Optional
|
|
6
6
|
|
|
@@ -405,4 +405,84 @@ def create_deployment_cmd(
|
|
|
405
405
|
click.echo(FeedbackManager.success(message="Template downloaded successfully"))
|
|
406
406
|
client = ctx.ensure_object(dict)["client"]
|
|
407
407
|
config: Dict[str, Any] = ctx.ensure_object(dict)["config"]
|
|
408
|
-
|
|
408
|
+
is_web_analytics_starter_kit = bool(template and "web-analytics-starter-kit" in template)
|
|
409
|
+
create_deployment(
|
|
410
|
+
project,
|
|
411
|
+
client,
|
|
412
|
+
config,
|
|
413
|
+
wait,
|
|
414
|
+
auto,
|
|
415
|
+
verbose,
|
|
416
|
+
check,
|
|
417
|
+
allow_destructive_operations,
|
|
418
|
+
ingest_hint=not is_web_analytics_starter_kit,
|
|
419
|
+
)
|
|
420
|
+
show_web_analytics_starter_kit_hints(client, is_web_analytics_starter_kit)
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
def show_web_analytics_starter_kit_hints(client, is_web_analytics_starter_kit: bool) -> None:
|
|
424
|
+
try:
|
|
425
|
+
if not is_web_analytics_starter_kit:
|
|
426
|
+
return
|
|
427
|
+
|
|
428
|
+
from tinybird.tb.modules.cli import __unpatch_click_output
|
|
429
|
+
|
|
430
|
+
__unpatch_click_output()
|
|
431
|
+
tokens = client.tokens()
|
|
432
|
+
tracker_token = next((token for token in tokens if token["name"] == "tracker"), None)
|
|
433
|
+
if tracker_token:
|
|
434
|
+
click.echo(FeedbackManager.highlight(message="» Ingest data using the script below:"))
|
|
435
|
+
click.echo(
|
|
436
|
+
FeedbackManager.info(
|
|
437
|
+
message=f"""
|
|
438
|
+
<script
|
|
439
|
+
defer
|
|
440
|
+
src="https://unpkg.com/@tinybirdco/flock.js"
|
|
441
|
+
data-token="{tracker_token["token"]}"
|
|
442
|
+
data-host="{client.host}"
|
|
443
|
+
></script>
|
|
444
|
+
"""
|
|
445
|
+
)
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
try:
|
|
449
|
+
ttl = timedelta(days=365 * 10)
|
|
450
|
+
expiration_time = int((ttl + datetime.now(timezone.utc)).timestamp())
|
|
451
|
+
datasources = client.datasources()
|
|
452
|
+
pipes = client.pipes()
|
|
453
|
+
|
|
454
|
+
scopes = []
|
|
455
|
+
for res in pipes:
|
|
456
|
+
scope_data = {
|
|
457
|
+
"type": "PIPES:READ",
|
|
458
|
+
"resource": res["name"],
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
scopes.append(scope_data)
|
|
462
|
+
|
|
463
|
+
for res in datasources:
|
|
464
|
+
scope_data = {
|
|
465
|
+
"type": "DATASOURCES:READ",
|
|
466
|
+
"resource": res["name"],
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
scopes.append(scope_data)
|
|
470
|
+
|
|
471
|
+
response = client.create_jwt_token("web_analytics_starter_kit_jwt", expiration_time, scopes)
|
|
472
|
+
click.echo(FeedbackManager.highlight(message="» Open this URL in your browser to see the dashboard:\n"))
|
|
473
|
+
click.echo(
|
|
474
|
+
FeedbackManager.info(
|
|
475
|
+
message=f"https://analytics.tinybird.co?token={response['token']}&host={client.host}"
|
|
476
|
+
)
|
|
477
|
+
)
|
|
478
|
+
except Exception:
|
|
479
|
+
dashboard_token = next((token for token in tokens if token["name"] == "dashboard"), None)
|
|
480
|
+
if dashboard_token:
|
|
481
|
+
click.echo(FeedbackManager.highlight(message="» Open this URL in your browser to see the dashboard:\n"))
|
|
482
|
+
click.echo(
|
|
483
|
+
FeedbackManager.info(
|
|
484
|
+
message=f"https://analytics.tinybird.co?token={dashboard_token['token']}&host={client.host}"
|
|
485
|
+
)
|
|
486
|
+
)
|
|
487
|
+
except Exception:
|
|
488
|
+
pass
|
|
@@ -66,7 +66,7 @@ def api_post(
|
|
|
66
66
|
|
|
67
67
|
# TODO(eclbg): This logic should be in the server, and there should be a dedicated endpoint for promoting a deployment
|
|
68
68
|
# potato
|
|
69
|
-
def promote_deployment(host: Optional[str], headers: dict, wait: bool) -> None:
|
|
69
|
+
def promote_deployment(host: Optional[str], headers: dict, wait: bool, ingest_hint: Optional[bool] = True) -> None:
|
|
70
70
|
TINYBIRD_API_URL = f"{host}/v1/deployments"
|
|
71
71
|
result = api_fetch(TINYBIRD_API_URL, headers)
|
|
72
72
|
|
|
@@ -123,7 +123,7 @@ def promote_deployment(host: Optional[str], headers: dict, wait: bool) -> None:
|
|
|
123
123
|
break
|
|
124
124
|
|
|
125
125
|
time.sleep(5)
|
|
126
|
-
if last_deployment.get("id") == "0":
|
|
126
|
+
if last_deployment.get("id") == "0" and ingest_hint:
|
|
127
127
|
# This is the first deployment, so we prompt the user to ingest data
|
|
128
128
|
click.echo(
|
|
129
129
|
FeedbackManager.info(
|
|
@@ -197,6 +197,7 @@ def create_deployment(
|
|
|
197
197
|
verbose: bool = False,
|
|
198
198
|
check: Optional[bool] = None,
|
|
199
199
|
allow_destructive_operations: Optional[bool] = None,
|
|
200
|
+
ingest_hint: Optional[bool] = True,
|
|
200
201
|
) -> None:
|
|
201
202
|
# TODO: This code is duplicated in build_server.py
|
|
202
203
|
# Should be refactored to be shared
|
|
@@ -349,7 +350,7 @@ def create_deployment(
|
|
|
349
350
|
click.echo(FeedbackManager.info(message="✓ Deployment is ready"))
|
|
350
351
|
|
|
351
352
|
if auto:
|
|
352
|
-
promote_deployment(client.host, HEADERS, wait=wait)
|
|
353
|
+
promote_deployment(client.host, HEADERS, wait=wait, ingest_hint=ingest_hint)
|
|
353
354
|
|
|
354
355
|
|
|
355
356
|
def _build_data_movement_message(kind: str, source_mv_name: Optional[str]) -> str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/create_datafile.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/deploy_check.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/diff_resource.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/execute_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/request_endpoint.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/agent/tools/run_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/datafile/pipe_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb/modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev270 → tinybird-0.0.1.dev272}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|