tinybird-cli 5.2.2.dev3__tar.gz → 5.2.2.dev4__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.
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/PKG-INFO +6 -1
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/__cli__.py +2 -2
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/client.py +11 -3
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/datafile.py +30 -3
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/feedback_manager.py +10 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/common.py +1 -1
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird_cli.egg-info/PKG-INFO +6 -1
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/setup.cfg +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/check_pypi.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/config.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/connectors.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/context.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/datatypes.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/git_settings.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/sql.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/sql_template.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/sql_toolset.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/syncasync.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/token.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tornado_template.py +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird_cli.egg-info/SOURCES.txt +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird_cli.egg-info/dependency_links.txt +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird_cli.egg-info/entry_points.txt +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird_cli.egg-info/requires.txt +0 -0
- {tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version: 5.2.2.
|
|
3
|
+
Version: 5.2.2.dev4
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -19,6 +19,11 @@ Changelog
|
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
21
|
|
|
22
|
+
5.2.2.dev4
|
|
23
|
+
**********
|
|
24
|
+
|
|
25
|
+
- `Added` `tb push` now supports `dynamodb` as service type
|
|
26
|
+
|
|
22
27
|
5.2.2.dev3
|
|
23
28
|
**********
|
|
24
29
|
|
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '5.2.2.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '5.2.2.dev4'
|
|
8
|
+
__revision__ = '06332a3'
|
|
@@ -260,10 +260,14 @@ class TinyB(object):
|
|
|
260
260
|
response = await self._req(f"/v0/connectors?{urlencode(params)}")
|
|
261
261
|
return response["connectors"]
|
|
262
262
|
|
|
263
|
-
async def connections(self, connector: Optional[str] = None):
|
|
263
|
+
async def connections(self, connector: Optional[str] = None, skip_bigquery: Optional[bool] = False):
|
|
264
264
|
response = await self._req("/v0/connectors")
|
|
265
265
|
connectors = response["connectors"]
|
|
266
|
-
bigquery_connection =
|
|
266
|
+
bigquery_connection = None
|
|
267
|
+
if not skip_bigquery:
|
|
268
|
+
bigquery_connection = (
|
|
269
|
+
await self.bigquery_connection() if connector == "bigquery" or connector is None else None
|
|
270
|
+
)
|
|
267
271
|
connectors = connectors + [bigquery_connection] if bigquery_connection else connectors
|
|
268
272
|
if connector:
|
|
269
273
|
return [
|
|
@@ -885,8 +889,12 @@ class TinyB(object):
|
|
|
885
889
|
name_or_id: str,
|
|
886
890
|
service: Optional[str] = None,
|
|
887
891
|
key: Optional[str] = "name",
|
|
892
|
+
skip_bigquery: Optional[bool] = False,
|
|
888
893
|
) -> Optional[Dict[str, Any]]:
|
|
889
|
-
return next(
|
|
894
|
+
return next(
|
|
895
|
+
(c for c in await self.connections(connector=service, skip_bigquery=skip_bigquery) if c[key] == name_or_id),
|
|
896
|
+
None,
|
|
897
|
+
)
|
|
890
898
|
|
|
891
899
|
async def get_connector_by_id(self, connector_id: Optional[str] = None):
|
|
892
900
|
return await self._req(f"/v0/connectors/{connector_id}")
|
|
@@ -146,6 +146,8 @@ class ImportReplacements:
|
|
|
146
146
|
("import_connector", "connector", None),
|
|
147
147
|
("import_external_datasource", "external_data_source", None),
|
|
148
148
|
("import_bucket_uri", "bucket_uri", None),
|
|
149
|
+
("import_table_arn", "dynamodb_table_arn", None),
|
|
150
|
+
("import_export_bucket", "dynamodb_export_bucket", None),
|
|
149
151
|
)
|
|
150
152
|
|
|
151
153
|
@staticmethod
|
|
@@ -1115,6 +1117,8 @@ def parse(
|
|
|
1115
1117
|
"import_external_datasource": assign_var("import_external_datasource"),
|
|
1116
1118
|
"import_bucket_uri": assign_var("import_bucket_uri"),
|
|
1117
1119
|
"import_query": assign_var("import_query"),
|
|
1120
|
+
"import_table_arn": assign_var("import_table_arn"),
|
|
1121
|
+
"import_export_bucket": assign_var("import_export_bucket"),
|
|
1118
1122
|
"shared_with": shared_with,
|
|
1119
1123
|
"export_service": assign_var("export_service"),
|
|
1120
1124
|
"export_connection_name": assign_var("export_connection_name"),
|
|
@@ -1319,6 +1323,11 @@ async def process_file(
|
|
|
1319
1323
|
if service in PREVIEW_CONNECTOR_SERVICES:
|
|
1320
1324
|
if not params.get("import_bucket_uri", None):
|
|
1321
1325
|
raise click.ClickException(FeedbackManager.error_missing_bucket_uri(datasource=datasource["name"]))
|
|
1326
|
+
elif service == "dynamodb":
|
|
1327
|
+
if not params.get("import_table_arn", None):
|
|
1328
|
+
raise click.ClickException(FeedbackManager.error_missing_table_arn(datasource=datasource["name"]))
|
|
1329
|
+
if not params.get("import_export_bucket", None):
|
|
1330
|
+
raise click.ClickException(FeedbackManager.error_missing_export_bucket(datasource=datasource["name"]))
|
|
1322
1331
|
else:
|
|
1323
1332
|
if not params.get("import_external_datasource", None):
|
|
1324
1333
|
raise click.ClickException(
|
|
@@ -1388,7 +1397,7 @@ async def process_file(
|
|
|
1388
1397
|
params.update(get_engine_params(node))
|
|
1389
1398
|
|
|
1390
1399
|
if "import_service" in node or "import_connection_name" in node:
|
|
1391
|
-
VALID_SERVICES: Tuple[str, ...] = ("bigquery", "snowflake", "s3", "s3_iamrole", "gcs")
|
|
1400
|
+
VALID_SERVICES: Tuple[str, ...] = ("bigquery", "snowflake", "s3", "s3_iamrole", "gcs", "dynamodb")
|
|
1392
1401
|
|
|
1393
1402
|
import_params = await get_import_params(params, node)
|
|
1394
1403
|
|
|
@@ -2958,7 +2967,16 @@ async def new_ds(
|
|
|
2958
2967
|
except DoesNotExistException:
|
|
2959
2968
|
datasource_exists = False
|
|
2960
2969
|
|
|
2961
|
-
|
|
2970
|
+
engine_param = ds["params"].get("engine", "")
|
|
2971
|
+
|
|
2972
|
+
if (
|
|
2973
|
+
ds["params"].get("service") == "dynamodb"
|
|
2974
|
+
and engine_param != ""
|
|
2975
|
+
and engine_param.lower() != "replacingmergetree"
|
|
2976
|
+
):
|
|
2977
|
+
raise click.ClickException(FeedbackManager.error_dynamodb_engine_not_supported(engine=engine_param))
|
|
2978
|
+
|
|
2979
|
+
if engine_param.lower() == "join":
|
|
2962
2980
|
deprecation_notice = FeedbackManager.warning_deprecated(
|
|
2963
2981
|
warning="Data Sources with Join engine are deprecated and will be removed in the next major release of tinybird-cli. Use MergeTree instead."
|
|
2964
2982
|
)
|
|
@@ -2988,8 +3006,17 @@ async def new_ds(
|
|
|
2988
3006
|
FeedbackManager.error_format(extension=extension, valid_formats=valid_formats)
|
|
2989
3007
|
)
|
|
2990
3008
|
params["format"] = extension
|
|
3009
|
+
datasource_response = await client.datasource_create_from_definition(params)
|
|
3010
|
+
datasource = datasource_response.get("datasource", {})
|
|
3011
|
+
|
|
3012
|
+
if datasource.get("service") == "dynamodb":
|
|
3013
|
+
job_id = datasource_response.get("import_id", None)
|
|
3014
|
+
if job_id:
|
|
3015
|
+
jobs = await client.jobs(status=["waiting", "working"])
|
|
3016
|
+
job_url = next((job["job_url"] for job in jobs if job["id"] == job_id), None)
|
|
3017
|
+
if job_url:
|
|
3018
|
+
click.echo(FeedbackManager.success_dynamodb_initial_load(job_url=job_url))
|
|
2991
3019
|
|
|
2992
|
-
datasource = (await client.datasource_create_from_definition(params)).get("datasource", {})
|
|
2993
3020
|
if "tokens" in ds and ds["tokens"]:
|
|
2994
3021
|
await manage_tokens()
|
|
2995
3022
|
|
|
@@ -119,6 +119,9 @@ class FeedbackManager:
|
|
|
119
119
|
error_file_extension = error_message(
|
|
120
120
|
"File extension for {filename} not supported. It should be one of .datasource or .pipe"
|
|
121
121
|
)
|
|
122
|
+
error_dynamodb_engine_not_supported = error_message(
|
|
123
|
+
"Engine {engine} not supported for DynamoDB Data Sources. Only ReplacingMergeTree is supported."
|
|
124
|
+
)
|
|
122
125
|
error_format = error_message("Format {extension} not supported. It should be one of {valid_formats}")
|
|
123
126
|
error_remove_endpoint = error_message("Failed removing pipe endpoint {error}")
|
|
124
127
|
error_remove_no_endpoint = error_message("Pipe does not have any endpoint")
|
|
@@ -296,6 +299,12 @@ class FeedbackManager:
|
|
|
296
299
|
error_missing_bucket_uri = error_message(
|
|
297
300
|
"Missing IMPORT_BUCKET_URI in '{datasource}'.\n** See https://www.tinybird.co/docs/ingest/s3 to learn more."
|
|
298
301
|
)
|
|
302
|
+
error_missing_table_arn = error_message(
|
|
303
|
+
"Missing IMPORT_TABLE_ARN in '{datasource}'.\n** See https://www.tinybird.co/docs/ingest/dynamodb to learn more."
|
|
304
|
+
)
|
|
305
|
+
error_missing_export_bucket = error_message(
|
|
306
|
+
"Missing IMPORT_EXPORT_BUCKET in '{datasource}'.\n** See https://www.tinybird.co/docs/ingest/dynamodb to learn more."
|
|
307
|
+
)
|
|
299
308
|
error_some_data_validation_have_failed = error_message("The data validation has failed")
|
|
300
309
|
error_some_tests_have_errors = error_message("Tests with errors")
|
|
301
310
|
error_regression_yaml_not_valid = error_message(
|
|
@@ -882,6 +891,7 @@ Ready? """
|
|
|
882
891
|
success_print_pipe = success_message("** Pipe: {pipe}")
|
|
883
892
|
success_create = success_message("** '{name}' created")
|
|
884
893
|
success_delete = success_message("** '{name}' deleted")
|
|
894
|
+
success_dynamodb_initial_load = success_message("** Initial load of DynamoDB table started: {job_url}")
|
|
885
895
|
success_progress_blocks = success_message("** \N{front-facing baby chick} done")
|
|
886
896
|
success_now_using_config = success_message("** Now using {name} ({id})")
|
|
887
897
|
success_connector_config = success_message(
|
|
@@ -2239,7 +2239,7 @@ async def validate_aws_iamrole_connection_name(
|
|
|
2239
2239
|
client: TinyB, connection_name: Optional[str], no_validate: Optional[bool] = False
|
|
2240
2240
|
) -> str:
|
|
2241
2241
|
if connection_name and no_validate is False:
|
|
2242
|
-
if await client.get_connector(connection_name) is not None:
|
|
2242
|
+
if await client.get_connector(connection_name, skip_bigquery=True) is not None:
|
|
2243
2243
|
raise CLIConnectionException(FeedbackManager.info_connection_already_exists(name=connection_name))
|
|
2244
2244
|
else:
|
|
2245
2245
|
while not connection_name:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version: 5.2.2.
|
|
3
|
+
Version: 5.2.2.dev4
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -19,6 +19,11 @@ Changelog
|
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
21
|
|
|
22
|
+
5.2.2.dev4
|
|
23
|
+
**********
|
|
24
|
+
|
|
25
|
+
- `Added` `tb push` now supports `dynamodb` as service type
|
|
26
|
+
|
|
22
27
|
5.2.2.dev3
|
|
23
28
|
**********
|
|
24
29
|
|
|
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-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.2.2.dev3 → tinybird-cli-5.2.2.dev4}/tinybird_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|