tinybird-cli 4.0.1.dev1__py3-none-any.whl → 4.0.1.dev2__py3-none-any.whl

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__.py CHANGED
@@ -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__ = '4.0.1.dev1'
8
- __revision__ = '5a27172'
7
+ __version__ = '4.0.1.dev2'
8
+ __revision__ = '2f7367b'
@@ -429,6 +429,9 @@ Ready? """
429
429
  "You are going to manually update workspace commit reference manually, this is just for special occasions. Do you want to update current commit reference '{current_commit}' to '{new_commit}'?"
430
430
  )
431
431
 
432
+ warning_exchange = warning_message(
433
+ "Warning: Do you want to exchange Data Source {datasource_a} by Data Source {datasource_b}?"
434
+ )
432
435
  warning_no_test_results = warning_message("Warning: No test results to show")
433
436
  warning_using_branch_token = warning_message("** You're using the token defined in $TB_TOKEN.")
434
437
  warning_using_branch_host = warning_message("** You're using the token defined in $TB_HOST.")
@@ -735,18 +735,20 @@ async def datasource_sync(ctx, datasource_name: str, yes: bool):
735
735
  raise CLIDatasourceException(FeedbackManager.error_syncing_datasource(datasource=datasource_name, error=str(e)))
736
736
 
737
737
 
738
- @datasource.command(name="exchange", hidden=True)
738
+ @datasource.command(name="exchange")
739
739
  @click.argument("datasource_a", required=True)
740
740
  @click.argument("datasource_b", required=True)
741
+ @click.option("--yes", is_flag=True, default=False, help="Do not ask for confirmation")
741
742
  @click.pass_context
742
743
  @coro
743
- async def datasource_exchange(ctx, datasource_a, datasource_b):
744
+ async def datasource_exchange(ctx, datasource_a: str, datasource_b: str, yes: bool):
744
745
  """Exchange two data sources"""
745
746
 
746
747
  client = ctx.obj["client"]
747
748
 
748
749
  try:
749
- await client.datasource_exchange(datasource_a, datasource_b)
750
+ if yes or click.confirm(FeedbackManager.warning_exchange(datasource_a=datasource_a, datasource_b=datasource_b)):
751
+ await client.datasource_exchange(datasource_a, datasource_b)
750
752
  except Exception as e:
751
753
  raise CLIDatasourceException(FeedbackManager.error_exception(error=e))
752
754
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 4.0.1.dev1
3
+ Version: 4.0.1.dev2
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -52,12 +52,17 @@ Changelog
52
52
  ----------
53
53
 
54
54
 
55
+ 4.0.1.dev2
56
+ ************
57
+
58
+ - `Added` `tb datasource exchange datasource_a datasource_b` to exchange to data sources
59
+
55
60
  4.0.1.dev1
56
61
  ************
57
62
 
58
63
  - `Added` command `tb token create` to be able to create JWT and permanent tokens
59
64
 
60
- 4.0.3.dev0
65
+ 4.0.1.dev0
61
66
  ************
62
67
 
63
68
  - `Fixed` Pin `tinybird-cli>=4,<5` in `requirements.txt` on `tb init --git`
@@ -1,4 +1,4 @@
1
- tinybird/__cli__.py,sha256=h7uiqp7r_bHuDKvdjN4vysMcmW4U9DWpy9XAw9TcvwM,254
1
+ tinybird/__cli__.py,sha256=RHmuIG_ohD-7EKHghLDWhgxfpgo7Ftyzx8_ovcJkqSA,254
2
2
  tinybird/check_pypi.py,sha256=_4NkharLyR_ELrAdit-ftqIWvOf7jZNPt3i76frlo9g,975
3
3
  tinybird/client.py,sha256=uZSo3fGvvlpKzg8-vkE7oCRdOmy7KaEWJ2mIRZX7EYc,47549
4
4
  tinybird/config.py,sha256=E0jDwbFD1zhdijNhtF8fg6mqIyKbZ8xpNPP_3n2PFpE,2003
@@ -6,7 +6,7 @@ tinybird/connectors.py,sha256=lkpVSUmSuViEZBa4QjTK7YmPHUop0a5UFoTrSmlVq6k,15244
6
6
  tinybird/context.py,sha256=NiWhCFJeBEtvwCMbu60OdIBRRd6V9qY9aqYaHmeumbo,1057
7
7
  tinybird/datafile.py,sha256=cd-ugs09RvLGKurPAN8hbKvYbITSnZzb0GI77gcjk1I,210877
8
8
  tinybird/datatypes.py,sha256=adYOQBTyfeBGVINIlaRex_81gTQQuqF2M9VTQpzq1H0,7060
9
- tinybird/feedback_manager.py,sha256=F-76CNPzmtq-sJdw7ilRO61NR1YGZ2rmJd63WJM74Zs,60991
9
+ tinybird/feedback_manager.py,sha256=Hnv8ZYyCnGivjjL4RrzxiQxSoswFql4behEVkk_OuBo,61138
10
10
  tinybird/git_settings.py,sha256=vu8sWb3TAXeM8Tqy27aR0el8MnPm7kqQzTRV76xB0ro,4707
11
11
  tinybird/sql.py,sha256=hUnpfmkRkdyZV2ylIYflzxnwyv5Es7fLEv6cBc39OJA,41589
12
12
  tinybird/sql_template.py,sha256=WqVD-nM7lZUoELxSLi-6iiwILk7A9PRWdqjR3iNWC7k,81800
@@ -24,7 +24,7 @@ tinybird/tb_cli_modules/cli.py,sha256=7ce9J4VuaKiGRhFrKZB-MxwS4uVtczI4cGFSDV1hwI
24
24
  tinybird/tb_cli_modules/common.py,sha256=uQdsRot2nE4_a2S9Btd-T03uJCM2vhF2QEuB8FYIHqY,78632
25
25
  tinybird/tb_cli_modules/config.py,sha256=6NTgIdwf0X132A1j6G_YrdPep87ymZ9b5pABabKLzh4,11484
26
26
  tinybird/tb_cli_modules/connection.py,sha256=Pf-p9tr72vkWUUj5jgMVb4wFum5zCpFKAg697uK-qf0,32368
27
- tinybird/tb_cli_modules/datasource.py,sha256=ZNGEDT0X7EPusG29gZwVOqLMQvdt01X2lcVoGlORgx0,31968
27
+ tinybird/tb_cli_modules/datasource.py,sha256=NXECxbQUOe7L2BBhC5ZHxVefhQBP32fviXIfMBE6eRQ,32189
28
28
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
29
29
  tinybird/tb_cli_modules/job.py,sha256=AG69LPb9MbobA1awwJFZJvxqarDKfRlsBjw2V1zvYqc,2964
30
30
  tinybird/tb_cli_modules/pipe.py,sha256=qA6G-O1d9zVzV7ZTGmSlsCa3MGM2JdG8JXOj3TKdeqM,26132
@@ -36,8 +36,8 @@ tinybird/tb_cli_modules/workspace.py,sha256=DTIQ1-H5Kazz1CtRwqMeYAtyQ_BQtaLXfcHn
36
36
  tinybird/tb_cli_modules/workspace_members.py,sha256=3HzY43218fb35ZM81mtkwDQe7gAAf1zEFY6kIEhGvgE,8268
37
37
  tinybird/tb_cli_modules/tinyunit/tinyunit.py,sha256=0dYYmZMMJVubxSPls2e_a-fqtUYvgLfu2B0xwLfkbHw,11667
38
38
  tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py,sha256=j92za8QbXrv4eIPjKBZPn9ghR-nYQ2wZZ88MeXyMWXE,1868
39
- tinybird_cli-4.0.1.dev1.dist-info/METADATA,sha256=4OK1B8UinBjvEBwN0GhN623Ym8R-RNOI0lsEvY5X0uo,72457
40
- tinybird_cli-4.0.1.dev1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
41
- tinybird_cli-4.0.1.dev1.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
42
- tinybird_cli-4.0.1.dev1.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
43
- tinybird_cli-4.0.1.dev1.dist-info/RECORD,,
39
+ tinybird_cli-4.0.1.dev2.dist-info/METADATA,sha256=mh_nIFAIJJe920uprsM5FtmGIHTIPPI3S4jOfCDVhrU,72572
40
+ tinybird_cli-4.0.1.dev2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
41
+ tinybird_cli-4.0.1.dev2.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
42
+ tinybird_cli-4.0.1.dev2.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
43
+ tinybird_cli-4.0.1.dev2.dist-info/RECORD,,