tinybird 0.0.1.dev204__py3-none-any.whl → 0.0.1.dev206__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.

Potentially problematic release.


This version of tinybird might be problematic. Click here for more details.

tinybird/prompts.py CHANGED
@@ -820,6 +820,8 @@ sql_instructions = """
820
820
  - General functions and aggregate functions are case sensitive.
821
821
  - Character insensitive functions are case insensitive.
822
822
  - Parameters are never quoted in any case.
823
+ - Use the following syntax in the SQL section for the iceberg table function: iceberg('s3://bucket/path/to/table', {{{{tb_secret('aws_access_key_id')}}}}, {{{{tb_secret('aws_secret_access_key')}}}})
824
+ - Use the following syntax in the SQL section for the postgres table function: postgresql('host:port', 'database', 'table', {{{{tb_secret('db_username')}}}}, {{{{tb_secret('db_password')}}}}), 'schema')
823
825
  </sql_instructions>
824
826
  """.format(
825
827
  general_functions=general_functions,
tinybird/tb/__cli__.py CHANGED
@@ -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.dev204'
8
- __revision__ = 'f397fef'
7
+ __version__ = '0.0.1.dev206'
8
+ __revision__ = '3b4a730'
tinybird/tb/client.py CHANGED
@@ -551,7 +551,7 @@ class TinyB:
551
551
  async def analyze_pipe_node(
552
552
  self, pipe_name: str, node: Dict[str, Any], dry_run: str = "false", datasource_name: Optional[str] = None
553
553
  ):
554
- params = {**{"include_datafile": "true", "dry_run": dry_run}, **node.get("params", node)}
554
+ params = {"include_datafile": "true", "dry_run": dry_run, **node.get("params", node)}
555
555
  if "mode" in params:
556
556
  params.pop("mode")
557
557
  node_name = node["params"]["name"] if node.get("params", None) else node["name"]
@@ -43,7 +43,7 @@ def build(ctx: click.Context, watch: bool) -> None:
43
43
  if project.has_deeper_level():
44
44
  click.echo(
45
45
  FeedbackManager.warning(
46
- message="Default max_depth is 2, but project has deeper level. "
46
+ message="Default max_depth is 3, but project has deeper level. "
47
47
  "You can change max_depth by running `tb --max-depth <depth> <cmd>`"
48
48
  )
49
49
  )
@@ -21,6 +21,7 @@ from click import Context
21
21
  from tinybird.prompts import quarantine_prompt
22
22
  from tinybird.syncasync import sync_to_async
23
23
  from tinybird.tb.client import AuthNoTokenException, DoesNotExistException, TinyB
24
+ from tinybird.tb.modules.build import process as build_project
24
25
  from tinybird.tb.modules.cli import cli
25
26
  from tinybird.tb.modules.common import (
26
27
  _analyze,
@@ -784,7 +785,7 @@ async def datasource_create(
784
785
  connection_name = ""
785
786
  topics: List[str] = []
786
787
  if len(connection_files) == 0:
787
- click.echo(FeedbackManager.error(message=f"x No {datasource_type} connections found."))
788
+ click.echo(FeedbackManager.error(message=f" No {datasource_type} connections found."))
788
789
  if click.confirm(
789
790
  FeedbackManager.highlight(message=f"\n? Do you want to create a {datasource_type} connection? [Y/n]"),
790
791
  show_default=False,
@@ -888,6 +889,21 @@ async def datasource_create(
888
889
 
889
890
  if datasource_type == "Kafka":
890
891
  connections = await client.connections("kafka")
892
+ kafka_connection_files = project.get_kafka_connection_files()
893
+
894
+ # if we have no topics from before and no connections, we need to build the project
895
+ if len(topics) == 0 and len(kafka_connection_files) != len(connections):
896
+ click.echo(FeedbackManager.error(message="✗ Some Kafka connections are missing."))
897
+ if click.confirm(
898
+ FeedbackManager.highlight(message="? Do you want to build your project before continue? [Y/n]"),
899
+ show_default=False,
900
+ default=True,
901
+ ):
902
+ click.echo(FeedbackManager.gray(message="» Building project..."))
903
+ build_project(project=project, tb_client=client, watch=False, silent=True)
904
+ click.echo(FeedbackManager.success(message="✓ Build completed!"))
905
+ connections = await client.connections("kafka")
906
+
891
907
  connection_id = next((c["id"] for c in connections if c["name"] == connection), connection)
892
908
 
893
909
  if not topics:
@@ -531,7 +531,7 @@ def create_deployment(
531
531
  if project.has_deeper_level():
532
532
  click.echo(
533
533
  FeedbackManager.warning(
534
- message="\nDefault max_depth is 2, but project has deeper level. "
534
+ message="\nDefault max_depth is 3, but project has deeper level. "
535
535
  "You can change max_depth by running `tb --max-depth <depth> <cmd>`"
536
536
  )
537
537
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev204
3
+ Version: 0.0.1.dev206
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -3,7 +3,7 @@ tinybird/context.py,sha256=FfqYfrGX_I7PKGTQo93utaKPDNVYWelg4Hsp3evX5wM,1291
3
3
  tinybird/datatypes.py,sha256=r4WCvspmrXTJHiPjjyOTiZyZl31FO3Ynkwq4LQsYm6E,11059
4
4
  tinybird/feedback_manager.py,sha256=1INQFfRfuMCb9lfB8KNf4r6qC2khW568hoHjtk-wshI,69305
5
5
  tinybird/git_settings.py,sha256=Sw_8rGmribEFJ4Z_6idrVytxpFYk7ez8ei0qHULzs3E,3934
6
- tinybird/prompts.py,sha256=rpgvMpR103niDnoDMSz8hRAYBdgfrorfD5-7g23BMQQ,37596
6
+ tinybird/prompts.py,sha256=ZdpY7FyJh9vg7SfZkR0h5h-dy2VecbBMkli3nI7-eVo,38006
7
7
  tinybird/sql.py,sha256=C_B81wwv3BsqyXGhF5oTk9DcTUkrp7NwIFqSzd3Dmjc,47854
8
8
  tinybird/sql_template.py,sha256=ZFW9-wfDrRlLxmOgrgynMG_gkfN9MR8zpGmXB52s0_4,99891
9
9
  tinybird/sql_template_fmt.py,sha256=KUHdj5rYCYm_rKKdXYSJAE9vIyXUQLB0YSZnUXHeBlY,10196
@@ -12,12 +12,12 @@ tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
12
12
  tinybird/tornado_template.py,sha256=jjNVDMnkYFWXflmT8KU_Ssbo5vR8KQq3EJMk5vYgXRw,41959
13
13
  tinybird/ch_utils/constants.py,sha256=aYvg2C_WxYWsnqPdZB1ZFoIr8ZY-XjUXYyHKE9Ansj0,3890
14
14
  tinybird/ch_utils/engine.py,sha256=X4tE9OrfaUy6kO9cqVEzyI9cDcmOF3IAssRRzsTsfEQ,40781
15
- tinybird/tb/__cli__.py,sha256=emMtQqateNrUzpFaBymseml0PJrkY0srb1kjUK5eDUc,247
15
+ tinybird/tb/__cli__.py,sha256=weL8GV7v2R7GmTKqnqf_6_aIq5rPw3H_3__782moZwU,247
16
16
  tinybird/tb/check_pypi.py,sha256=i3l2L8IajeB7sreikR7oPlYJki9MtS3c_M4crnmbByc,760
17
17
  tinybird/tb/cli.py,sha256=u3eGOhX0MHkuT6tiwaZ0_3twqLmqKXDAOxF7yV_Nn9Q,1075
18
- tinybird/tb/client.py,sha256=CO-dQw8h28X6T6IO-Z79yPBKaJQT1Rwya5b6gexvw58,56491
18
+ tinybird/tb/client.py,sha256=0zUAi9Lclo2JusQKlQnSnSP1XCiCK9I03XtLqmk8e04,56487
19
19
  tinybird/tb/config.py,sha256=jT9xndpeCY_g0HdB5qE2EquC0TFRRnkPnQFWZWd04jo,3998
20
- tinybird/tb/modules/build.py,sha256=96J_n8IWYPLN0JORPb6QXgT4-3JXw4JSXmAtzQcqN7E,19951
20
+ tinybird/tb/modules/build.py,sha256=XKG06BnI_QSf8gtR2EdlmYcgG0XgP5MPDSXqMDRzsXw,19951
21
21
  tinybird/tb/modules/cicd.py,sha256=Njb6eZOHHbUkoJJx6KoixO9PsfA_T-3Ybkya9-50Ca8,7328
22
22
  tinybird/tb/modules/cli.py,sha256=k6Bp-lWC-ruMMB47lxwsinLQt4qJL_n84hjyxi9JYt4,15676
23
23
  tinybird/tb/modules/common.py,sha256=R675BLZTnPlCoPphCTcy3S1lsf1MF_H3U_ox9yPNCqg,84187
@@ -25,8 +25,8 @@ tinybird/tb/modules/config.py,sha256=ziqW_t_mRVvWOd85VoB4vKyvgMkEfpXDf9H4v38p2xc
25
25
  tinybird/tb/modules/connection.py,sha256=FJZHTAR6sf5VbPIotxbyMgO-6UCCbnsKj6I0EjeCa-g,17791
26
26
  tinybird/tb/modules/copy.py,sha256=2Mm4FWKehOG7CoOhiF1m9UZJgJn0W1_cMolqju8ONYg,5805
27
27
  tinybird/tb/modules/create.py,sha256=sncG6iaeS_AApY1EmmfYEdj9B6-1CPZJzvTmfJQj_Rc,22112
28
- tinybird/tb/modules/datasource.py,sha256=wDclRBzzyfZXstTL6r6BATagUmENRzcWRxrIXUlDWko,38420
29
- tinybird/tb/modules/deployment.py,sha256=QeLYvk6vNmOFC2FAvhR5tzFIYDkSCVgT08CGEIxr4fU,28154
28
+ tinybird/tb/modules/datasource.py,sha256=TxQyTJucpPbLBov-5gbWmJLlz07ZbqfCyvva__WO6p4,39373
29
+ tinybird/tb/modules/deployment.py,sha256=9G_7MpNvtr60fCKJNT3-Ir8Y083iiV3NerRnbZ_TDd8,28154
30
30
  tinybird/tb/modules/deprecations.py,sha256=rrszC1f_JJeJ8mUxGoCxckQTJFBCR8wREf4XXXN-PRc,4507
31
31
  tinybird/tb/modules/dev_server.py,sha256=57FCKuWpErwYUYgHspYDkLWEm9F4pbvVOtMrFXX1fVU,10129
32
32
  tinybird/tb/modules/endpoint.py,sha256=XySDt3pk66vxOZ0egUfz4bY8bEk3BjOXkv-L0OIJ3sc,12083
@@ -80,8 +80,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
80
80
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
81
81
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
82
82
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
83
- tinybird-0.0.1.dev204.dist-info/METADATA,sha256=fRB3xgMwVhTQ-iN03lUAqhhvZScvLqk1Y0lAZ9fX-_E,1682
84
- tinybird-0.0.1.dev204.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
85
- tinybird-0.0.1.dev204.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
86
- tinybird-0.0.1.dev204.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
87
- tinybird-0.0.1.dev204.dist-info/RECORD,,
83
+ tinybird-0.0.1.dev206.dist-info/METADATA,sha256=WpM5_GAQZuYqRi1FreFTNrEvX0An1pX0EOfTDBQehsA,1682
84
+ tinybird-0.0.1.dev206.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
85
+ tinybird-0.0.1.dev206.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
86
+ tinybird-0.0.1.dev206.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
87
+ tinybird-0.0.1.dev206.dist-info/RECORD,,