tinybird 0.0.1.dev304__tar.gz → 0.0.1.dev306__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.dev304 → tinybird-0.0.1.dev306}/PKG-INFO +2 -1
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/context.py +0 -1
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/prompts.py +1 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/service_datasources.py +120 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/sql_template.py +8 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/cli.py +8 -1
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/local.py +53 -3
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/local_common.py +10 -2
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird.egg-info/PKG-INFO +2 -1
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird.egg-info/requires.txt +1 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/setup.cfg +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/datafile/common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/__init__.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/animations.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/banner.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/command_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/compactor.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/explore_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/file_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/memory.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/mock_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/models.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/prompts.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/testing_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/__init__.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/analyze.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/append.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/build.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/datafile.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/deploy.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/deploy_check.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/diff_resource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/execute_query.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/file.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/get_endpoint_stats.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/get_openapi_definition.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/mock.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/plan.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/request_endpoint.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/run_command.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/secret.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/test.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/utils.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/build_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/deployment_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/login_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/mock_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/secret_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/test_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev306
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/forward/commands
|
|
6
6
|
Author: Tinybird
|
|
@@ -39,6 +39,7 @@ Requires-Dist: packaging<24,>=23.1
|
|
|
39
39
|
Requires-Dist: llm>=0.19
|
|
40
40
|
Requires-Dist: thefuzz==0.22.1
|
|
41
41
|
Requires-Dist: python-dotenv==1.1.0
|
|
42
|
+
Requires-Dist: pyjwt[crypto]==2.9.0
|
|
42
43
|
Dynamic: author
|
|
43
44
|
Dynamic: author-email
|
|
44
45
|
Dynamic: description
|
|
@@ -12,7 +12,6 @@ table_id: ContextVar[str] = ContextVar("table_id")
|
|
|
12
12
|
hfi_frequency: ContextVar[float] = ContextVar("hfi_frequency")
|
|
13
13
|
hfi_frequency_gatherer: ContextVar[float] = ContextVar("hfi_frequency_gatherer")
|
|
14
14
|
use_gatherer: ContextVar[bool] = ContextVar("use_gatherer")
|
|
15
|
-
allow_gatherer_fallback: ContextVar[bool] = ContextVar("allow_gatherer_fallback")
|
|
16
15
|
gatherer_allow_s3_backup_on_user_errors: ContextVar[bool] = ContextVar("gatherer_allow_s3_backup_on_user_errors")
|
|
17
16
|
disable_template_security_validation: ContextVar[bool] = ContextVar("disable_template_security_validation")
|
|
18
17
|
origin: ContextVar[str] = ContextVar("origin")
|
|
@@ -776,6 +776,7 @@ datasource_instructions = """
|
|
|
776
776
|
- Use always json paths to define the schema. Example: `user_id` String `json:$.user_id`,
|
|
777
777
|
- Array columns are supported with a special syntax. Example: `items` Array(String) `json:$.items[:]`
|
|
778
778
|
- If the datasource is using an S3 or GCS connection, they need to set IMPORT_CONNECTION_NAME, IMPORT_BUCKET_URI and IMPORT_SCHEDULE (GCS @on-demand only, S3 supports @auto too)
|
|
779
|
+
- If the datasource is using a Kafka connection, they need to set KAFKA_CONNECTION_NAME as the name of the .connection file, KAFKA_TOPIC topic_name and KAFKA_GROUP_ID as the group id for the datasource
|
|
779
780
|
- Unless the user asks for them, do not include ENGINE_PARTITION_KEY and ENGINE_PRIMARY_KEY.
|
|
780
781
|
- DateTime64 type without precision is not supported. Use DateTime64(3) instead.
|
|
781
782
|
</datasource_file_instructions>
|
|
@@ -455,6 +455,79 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
|
|
|
455
455
|
{"name": "feature", "type": "String"},
|
|
456
456
|
],
|
|
457
457
|
},
|
|
458
|
+
{
|
|
459
|
+
"name": "tinybird.llm_usage",
|
|
460
|
+
"description": "LLM usage metrics from Tinybird AI features including token consumption, costs, and model usage for each request in the workspace.",
|
|
461
|
+
"dateColumn": "start_time",
|
|
462
|
+
"engine": {
|
|
463
|
+
"engine": "MergeTree",
|
|
464
|
+
"sorting_key": "workspace_id, start_time, user_email, request_id",
|
|
465
|
+
"partition_key": "toYYYYMM(start_time)",
|
|
466
|
+
},
|
|
467
|
+
"columns": [
|
|
468
|
+
{"name": "start_time", "type": "DateTime"},
|
|
469
|
+
{"name": "end_time", "type": "DateTime"},
|
|
470
|
+
{"name": "organization_id", "type": "String"},
|
|
471
|
+
{"name": "organization_name", "type": "String"},
|
|
472
|
+
{"name": "workspace_id", "type": "String"},
|
|
473
|
+
{"name": "workspace_name", "type": "String"},
|
|
474
|
+
{"name": "user_email", "type": "String"},
|
|
475
|
+
{"name": "request_id", "type": "String"},
|
|
476
|
+
{"name": "prompt_tokens", "type": "UInt32"},
|
|
477
|
+
{"name": "completion_tokens", "type": "UInt32"},
|
|
478
|
+
{"name": "total_tokens", "type": "UInt32"},
|
|
479
|
+
{"name": "duration", "type": "Float32"},
|
|
480
|
+
{"name": "cost", "type": "Float32"},
|
|
481
|
+
{"name": "origin", "type": "String"},
|
|
482
|
+
{"name": "feature", "type": "String"},
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"name": "tinybird.query_metrics",
|
|
487
|
+
"description": "Query stats metrics from your workspace.",
|
|
488
|
+
"dateColumn": "event_time",
|
|
489
|
+
"engine": {
|
|
490
|
+
"engine": "ReplacingMergeTree",
|
|
491
|
+
"sorting_key": "event_time, organization_id, query_id",
|
|
492
|
+
"partition_key": "toStartOfDay(event_time)",
|
|
493
|
+
},
|
|
494
|
+
"columns": [
|
|
495
|
+
{"name": "event_time", "type": "DateTime"},
|
|
496
|
+
{"name": "organization_id", "type": "String"},
|
|
497
|
+
{"name": "workspace_id", "type": "String"},
|
|
498
|
+
{"name": "query", "type": "String"},
|
|
499
|
+
{"name": "query_id", "type": "String"},
|
|
500
|
+
{"name": "query_type", "type": "String"},
|
|
501
|
+
{"name": "query_start_time", "type": "DateTime"},
|
|
502
|
+
{"name": "query_duration_ms", "type": "Int32"},
|
|
503
|
+
{"name": "pipe_id", "type": "String"},
|
|
504
|
+
{"name": "job_id", "type": "String"},
|
|
505
|
+
{"name": "job_kind", "type": "String"},
|
|
506
|
+
{"name": "read_rows", "type": "Int32"},
|
|
507
|
+
{"name": "read_bytes", "type": "Int32"},
|
|
508
|
+
{"name": "written_rows", "type": "Int32"},
|
|
509
|
+
{"name": "written_bytes", "type": "Int32"},
|
|
510
|
+
{"name": "memory_usage", "type": "Int32"},
|
|
511
|
+
{"name": "vcpu_time", "type": "Float32"},
|
|
512
|
+
{"name": "exception_code", "type": "Int32"},
|
|
513
|
+
{"name": "exception", "type": "String"},
|
|
514
|
+
],
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"name": "tinybird.vcpu_time",
|
|
518
|
+
"description": "vCPU time metrics from your workspace.",
|
|
519
|
+
"dateColumn": "minute_slot",
|
|
520
|
+
"engine": {
|
|
521
|
+
"engine": "AggregatingMergeTree",
|
|
522
|
+
"sorting_key": "organization_id, minute_slot",
|
|
523
|
+
"partition_key": "toStartOfDay(minute_slot)",
|
|
524
|
+
},
|
|
525
|
+
"columns": [
|
|
526
|
+
{"name": "minute_slot", "type": "DateTime"},
|
|
527
|
+
{"name": "organization_id", "type": "String"},
|
|
528
|
+
{"name": "vcpu_time", "type": "Float64"},
|
|
529
|
+
],
|
|
530
|
+
},
|
|
458
531
|
]
|
|
459
532
|
|
|
460
533
|
|
|
@@ -935,6 +1008,53 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
|
|
|
935
1008
|
{"name": "feature", "type": "String"},
|
|
936
1009
|
],
|
|
937
1010
|
},
|
|
1011
|
+
{
|
|
1012
|
+
"name": "organization.query_metrics",
|
|
1013
|
+
"description": "Query stats metrics from your workspace.",
|
|
1014
|
+
"dateColumn": "event_time",
|
|
1015
|
+
"engine": {
|
|
1016
|
+
"engine": "ReplacingMergeTree",
|
|
1017
|
+
"sorting_key": "event_time, organization_id, query_id",
|
|
1018
|
+
"partition_key": "toStartOfDay(event_time)",
|
|
1019
|
+
},
|
|
1020
|
+
"columns": [
|
|
1021
|
+
{"name": "event_time", "type": "DateTime"},
|
|
1022
|
+
{"name": "organization_id", "type": "String"},
|
|
1023
|
+
{"name": "workspace_id", "type": "String"},
|
|
1024
|
+
{"name": "query", "type": "String"},
|
|
1025
|
+
{"name": "query_id", "type": "String"},
|
|
1026
|
+
{"name": "query_type", "type": "String"},
|
|
1027
|
+
{"name": "query_start_time", "type": "DateTime"},
|
|
1028
|
+
{"name": "query_duration_ms", "type": "Int32"},
|
|
1029
|
+
{"name": "pipe_id", "type": "String"},
|
|
1030
|
+
{"name": "job_id", "type": "String"},
|
|
1031
|
+
{"name": "job_kind", "type": "String"},
|
|
1032
|
+
{"name": "read_rows", "type": "Int32"},
|
|
1033
|
+
{"name": "read_bytes", "type": "Int32"},
|
|
1034
|
+
{"name": "written_rows", "type": "Int32"},
|
|
1035
|
+
{"name": "written_bytes", "type": "Int32"},
|
|
1036
|
+
{"name": "memory_usage", "type": "Int32"},
|
|
1037
|
+
{"name": "vcpu_time", "type": "Float32"},
|
|
1038
|
+
{"name": "exception_code", "type": "Int32"},
|
|
1039
|
+
{"name": "exception", "type": "String"},
|
|
1040
|
+
],
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"name": "organization.vcpu_time",
|
|
1044
|
+
"description": "vCPU time metrics from your workspace.",
|
|
1045
|
+
"dateColumn": "minute_slot",
|
|
1046
|
+
"engine": {
|
|
1047
|
+
"engine": "AggregatingMergeTree",
|
|
1048
|
+
"sorting_key": "organization_id, minute_slot",
|
|
1049
|
+
"partition_key": "toStartOfDay(minute_slot)",
|
|
1050
|
+
},
|
|
1051
|
+
"columns": [
|
|
1052
|
+
{"name": "minute_slot", "type": "DateTime"},
|
|
1053
|
+
{"name": "organization_id", "type": "String"},
|
|
1054
|
+
{"name": "workspace_id", "type": "String"},
|
|
1055
|
+
{"name": "vcpu_time", "type": "Float64"},
|
|
1056
|
+
],
|
|
1057
|
+
},
|
|
938
1058
|
]
|
|
939
1059
|
|
|
940
1060
|
|
|
@@ -2385,6 +2385,14 @@ def render_sql_template(
|
|
|
2385
2385
|
documentation="/cli/advanced-templates.html",
|
|
2386
2386
|
)
|
|
2387
2387
|
raise SQLTemplateException(str(e), documentation="/cli/advanced-templates.html")
|
|
2388
|
+
except IndexError as e:
|
|
2389
|
+
# This happens when trying to access string indices on empty strings
|
|
2390
|
+
if "string index out of range" in str(e):
|
|
2391
|
+
raise SQLTemplateException(
|
|
2392
|
+
"String index out of range. Check that string parameters have values before accessing specific characters (e.g., param[0]). Provide default values or add length checks in your template.",
|
|
2393
|
+
documentation="/cli/advanced-templates.html",
|
|
2394
|
+
)
|
|
2395
|
+
raise SQLTemplateException(str(e), documentation="/cli/advanced-templates.html")
|
|
2388
2396
|
except Exception as e:
|
|
2389
2397
|
# errors might vary here, we need to support as much as possible
|
|
2390
2398
|
# https://gitlab.com/tinybird/analytics/-/issues/943
|
|
@@ -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.dev306'
|
|
8
|
+
__revision__ = 'dcef65b'
|
|
@@ -110,7 +110,7 @@ def cli(
|
|
|
110
110
|
prompt: Optional[str] = None,
|
|
111
111
|
) -> None:
|
|
112
112
|
"""
|
|
113
|
-
|
|
113
|
+
Run just `tb` to use Tinybird Code to interact with your project.
|
|
114
114
|
"""
|
|
115
115
|
|
|
116
116
|
# We need to unpatch for our tests not to break
|
|
@@ -211,6 +211,13 @@ def cli(
|
|
|
211
211
|
is_prompt_mode = prompt is not None
|
|
212
212
|
|
|
213
213
|
if is_agent_mode or is_prompt_mode:
|
|
214
|
+
if any(arg in sys.argv for arg in ["--cloud", "--local"]):
|
|
215
|
+
raise CLIException(
|
|
216
|
+
FeedbackManager.error(
|
|
217
|
+
message="Tinybird Code does not support --cloud or --local flags. It will choose the correct environment based on your prompts."
|
|
218
|
+
)
|
|
219
|
+
)
|
|
220
|
+
|
|
214
221
|
run_agent(config, project, dangerously_skip_permissions, prompt=prompt)
|
|
215
222
|
|
|
216
223
|
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import uuid
|
|
1
3
|
from pathlib import Path
|
|
4
|
+
from typing import Any
|
|
2
5
|
|
|
3
6
|
import click
|
|
7
|
+
import jwt
|
|
4
8
|
import requests
|
|
5
9
|
from docker.client import DockerClient
|
|
6
10
|
|
|
7
11
|
from tinybird.tb.modules.cli import cli
|
|
8
|
-
from tinybird.tb.modules.common import update_cli
|
|
12
|
+
from tinybird.tb.modules.common import echo_json, update_cli
|
|
9
13
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
10
14
|
from tinybird.tb.modules.local_common import (
|
|
11
15
|
TB_CONTAINER_NAME,
|
|
@@ -125,7 +129,21 @@ def remove() -> None:
|
|
|
125
129
|
is_flag=True,
|
|
126
130
|
help="Skip pulling the latest Tinybird Local image. Use directly your current local image.",
|
|
127
131
|
)
|
|
128
|
-
|
|
132
|
+
@click.option(
|
|
133
|
+
"--user-token",
|
|
134
|
+
default=None,
|
|
135
|
+
envvar="TB_LOCAL_USER_TOKEN",
|
|
136
|
+
help="User token to use for the Tinybird Local container.",
|
|
137
|
+
)
|
|
138
|
+
@click.option(
|
|
139
|
+
"--workspace-token",
|
|
140
|
+
default=None,
|
|
141
|
+
envvar="TB_LOCAL_WORKSPACE_TOKEN",
|
|
142
|
+
help="Workspace token to use for the Tinybird Local container.",
|
|
143
|
+
)
|
|
144
|
+
def start(
|
|
145
|
+
use_aws_creds: bool, volumes_path: str, skip_new_version: bool, user_token: str, workspace_token: str
|
|
146
|
+
) -> None:
|
|
129
147
|
"""Start Tinybird Local"""
|
|
130
148
|
if volumes_path is not None:
|
|
131
149
|
absolute_path = Path(volumes_path).absolute()
|
|
@@ -134,7 +152,7 @@ def start(use_aws_creds: bool, volumes_path: str, skip_new_version: bool) -> Non
|
|
|
134
152
|
|
|
135
153
|
click.echo(FeedbackManager.highlight(message="» Starting Tinybird Local..."))
|
|
136
154
|
docker_client = get_docker_client()
|
|
137
|
-
start_tinybird_local(docker_client, use_aws_creds, volumes_path, skip_new_version)
|
|
155
|
+
start_tinybird_local(docker_client, use_aws_creds, volumes_path, skip_new_version, user_token, workspace_token)
|
|
138
156
|
click.echo(FeedbackManager.success(message="✓ Tinybird Local is ready!"))
|
|
139
157
|
|
|
140
158
|
|
|
@@ -183,3 +201,35 @@ def version() -> None:
|
|
|
183
201
|
"""Show Tinybird Local version"""
|
|
184
202
|
response = requests.get(f"{TB_LOCAL_ADDRESS}/version")
|
|
185
203
|
click.echo(FeedbackManager.success(message=f"✓ Tinybird Local version: {response.text}"))
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
@local.command()
|
|
207
|
+
@click.pass_context
|
|
208
|
+
def generate_tokens(ctx: click.Context) -> None:
|
|
209
|
+
"""Generate static tokens for initializing Tinybird Local"""
|
|
210
|
+
output = ctx.ensure_object(dict).get("output")
|
|
211
|
+
user_id = str(uuid.uuid4())
|
|
212
|
+
workspace_id = str(uuid.uuid4())
|
|
213
|
+
user_token_id = str(uuid.uuid4())
|
|
214
|
+
workspace_token_id = str(uuid.uuid4())
|
|
215
|
+
payload = {"u": user_id, "id": user_token_id, "host": None}
|
|
216
|
+
user_token = generate_token(payload)
|
|
217
|
+
payload = {"u": workspace_id, "id": workspace_token_id, "host": None}
|
|
218
|
+
workspace_token = generate_token(payload)
|
|
219
|
+
|
|
220
|
+
if output == "json":
|
|
221
|
+
echo_json({"workspace_token": workspace_token, "user_token": user_token})
|
|
222
|
+
else:
|
|
223
|
+
click.echo(FeedbackManager.gray(message="Workspace token: ") + FeedbackManager.info(message=workspace_token))
|
|
224
|
+
click.echo(FeedbackManager.gray(message="User token: ") + FeedbackManager.info(message=user_token))
|
|
225
|
+
click.echo(FeedbackManager.success(message="✓ Tinybird Local tokens generated!"))
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def generate_token(payload: dict[str, Any]) -> str:
|
|
229
|
+
algo = jwt.algorithms.get_default_algorithms()["HS256"]
|
|
230
|
+
msg = json.dumps(payload)
|
|
231
|
+
msg_base64 = jwt.utils.base64url_encode(msg.encode())
|
|
232
|
+
sign_key = algo.prepare_key("abcd")
|
|
233
|
+
signature = algo.sign(msg_base64, sign_key)
|
|
234
|
+
token = msg_base64 + b"." + jwt.utils.base64url_encode(signature)
|
|
235
|
+
return "p." + token.decode()
|
|
@@ -234,7 +234,9 @@ def start_tinybird_local(
|
|
|
234
234
|
docker_client: DockerClient,
|
|
235
235
|
use_aws_creds: bool,
|
|
236
236
|
volumes_path: Optional[str] = None,
|
|
237
|
-
skip_new_version: bool =
|
|
237
|
+
skip_new_version: bool = True,
|
|
238
|
+
user_token: Optional[str] = None,
|
|
239
|
+
workspace_token: Optional[str] = None,
|
|
238
240
|
) -> None:
|
|
239
241
|
"""Start the Tinybird container."""
|
|
240
242
|
pull_show_prompt = False
|
|
@@ -261,7 +263,13 @@ def start_tinybird_local(
|
|
|
261
263
|
if pull_required:
|
|
262
264
|
docker_client.images.pull(TB_IMAGE_NAME, platform="linux/amd64")
|
|
263
265
|
|
|
264
|
-
environment =
|
|
266
|
+
environment = {}
|
|
267
|
+
if use_aws_creds:
|
|
268
|
+
environment.update(get_use_aws_creds())
|
|
269
|
+
if user_token:
|
|
270
|
+
environment["TB_LOCAL_USER_TOKEN"] = user_token
|
|
271
|
+
if workspace_token:
|
|
272
|
+
environment["TB_LOCAL_WORKSPACE_TOKEN"] = workspace_token
|
|
265
273
|
|
|
266
274
|
container = get_existing_container_with_matching_env(docker_client, TB_CONTAINER_NAME, environment)
|
|
267
275
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev306
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/forward/commands
|
|
6
6
|
Author: Tinybird
|
|
@@ -39,6 +39,7 @@ Requires-Dist: packaging<24,>=23.1
|
|
|
39
39
|
Requires-Dist: llm>=0.19
|
|
40
40
|
Requires-Dist: thefuzz==0.22.1
|
|
41
41
|
Requires-Dist: python-dotenv==1.1.0
|
|
42
|
+
Requires-Dist: pyjwt[crypto]==2.9.0
|
|
42
43
|
Dynamic: author
|
|
43
44
|
Dynamic: author-email
|
|
44
45
|
Dynamic: description
|
|
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
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/deploy_check.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/diff_resource.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/execute_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/agent/tools/request_endpoint.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/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.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/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
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/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.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev306}/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
|