tinybird 0.0.1.dev188__tar.gz → 0.0.1.dev190__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.

Files changed (111) hide show
  1. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/PKG-INFO +1 -1
  2. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/__cli__.py +2 -2
  3. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/client.py +1 -5
  4. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/build.py +9 -0
  5. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/common.py +17 -5
  6. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/connection.py +20 -0
  7. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/create.py +23 -5
  8. tinybird-0.0.1.dev190/tinybird/tb/modules/datasource.py +904 -0
  9. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/deployment.py +8 -0
  10. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/project.py +44 -0
  11. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird.egg-info/PKG-INFO +1 -1
  12. tinybird-0.0.1.dev188/tinybird/tb/modules/datasource.py +0 -475
  13. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/setup.cfg +0 -0
  14. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/__cli__.py +0 -0
  15. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/ch_utils/constants.py +0 -0
  16. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/ch_utils/engine.py +0 -0
  17. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/check_pypi.py +0 -0
  18. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/client.py +0 -0
  19. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/config.py +0 -0
  20. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/connectors.py +0 -0
  21. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/context.py +0 -0
  22. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/datafile.py +0 -0
  23. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/datatypes.py +0 -0
  24. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/feedback_manager.py +0 -0
  25. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/git_settings.py +0 -0
  26. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/prompts.py +0 -0
  27. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/sql.py +0 -0
  28. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/sql_template.py +0 -0
  29. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/sql_template_fmt.py +0 -0
  30. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/sql_toolset.py +0 -0
  31. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/syncasync.py +0 -0
  32. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/check_pypi.py +0 -0
  33. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/cli.py +0 -0
  34. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/config.py +0 -0
  35. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/cicd.py +0 -0
  36. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/cli.py +0 -0
  37. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/config.py +0 -0
  38. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/copy.py +0 -0
  39. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/build.py +0 -0
  40. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/build_common.py +0 -0
  41. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
  42. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
  43. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/common.py +0 -0
  44. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/diff.py +0 -0
  45. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/exceptions.py +0 -0
  46. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/fixture.py +0 -0
  47. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/format_common.py +0 -0
  48. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
  49. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
  50. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
  51. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
  52. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
  53. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/playground.py +0 -0
  54. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/pull.py +0 -0
  55. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/deprecations.py +0 -0
  56. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/dev_server.py +0 -0
  57. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/endpoint.py +0 -0
  58. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/exceptions.py +0 -0
  59. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/feedback_manager.py +0 -0
  60. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/info.py +0 -0
  61. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/infra.py +0 -0
  62. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/job.py +0 -0
  63. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/llm.py +0 -0
  64. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/llm_utils.py +0 -0
  65. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/local.py +0 -0
  66. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/local_common.py +0 -0
  67. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/login.py +0 -0
  68. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/logout.py +0 -0
  69. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/materialization.py +0 -0
  70. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/mock.py +0 -0
  71. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/open.py +0 -0
  72. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/pipe.py +0 -0
  73. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/regions.py +0 -0
  74. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/secret.py +0 -0
  75. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/shell.py +0 -0
  76. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/table.py +0 -0
  77. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/telemetry.py +0 -0
  78. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/test.py +0 -0
  79. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
  80. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
  81. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/token.py +0 -0
  82. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/watch.py +0 -0
  83. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/workspace.py +0 -0
  84. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb/modules/workspace_members.py +0 -0
  85. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli.py +0 -0
  86. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/auth.py +0 -0
  87. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/branch.py +0 -0
  88. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/cicd.py +0 -0
  89. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/cli.py +0 -0
  90. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/common.py +0 -0
  91. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/config.py +0 -0
  92. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/connection.py +0 -0
  93. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/datasource.py +0 -0
  94. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/exceptions.py +0 -0
  95. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/fmt.py +0 -0
  96. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/job.py +0 -0
  97. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/pipe.py +0 -0
  98. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/regions.py +0 -0
  99. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/tag.py +0 -0
  100. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/telemetry.py +0 -0
  101. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/test.py +0 -0
  102. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  103. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  104. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/workspace.py +0 -0
  105. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  106. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird/tornado_template.py +0 -0
  107. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird.egg-info/SOURCES.txt +0 -0
  108. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird.egg-info/dependency_links.txt +0 -0
  109. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird.egg-info/entry_points.txt +0 -0
  110. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/tinybird.egg-info/requires.txt +0 -0
  111. {tinybird-0.0.1.dev188 → tinybird-0.0.1.dev190}/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.dev188
3
+ Version: 0.0.1.dev190
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -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.dev188'
8
- __revision__ = 'f13c1f2'
7
+ __version__ = '0.0.1.dev190'
8
+ __revision__ = '8a00bcf'
@@ -1024,11 +1024,7 @@ class TinyB:
1024
1024
  )
1025
1025
 
1026
1026
  async def kafka_list_topics(self, connection_id: str, timeout=5):
1027
- resp = await self._req(
1028
- f"/v0/connectors/{connection_id}/preview?preview_activity=false",
1029
- connect_timeout=timeout,
1030
- request_timeout=timeout,
1031
- )
1027
+ resp = await self._req(f"/v0/connectors/{connection_id}/preview?preview_activity=false", timeout=timeout)
1032
1028
  return [x["topic"] for x in resp["preview"]]
1033
1029
 
1034
1030
  async def get_gcp_service_account_details(self) -> Dict[str, Any]:
@@ -38,6 +38,15 @@ def build(ctx: click.Context, watch: bool) -> None:
38
38
  """
39
39
  project: Project = ctx.ensure_object(dict)["project"]
40
40
  tb_client: TinyB = ctx.ensure_object(dict)["client"]
41
+
42
+ if project.has_deeper_level():
43
+ click.echo(
44
+ FeedbackManager.warning(
45
+ message="Default max_depth is 2, but project has deeper level. "
46
+ "You can change max_depth by running `tb --max-depth <depth> <cmd>`"
47
+ )
48
+ )
49
+
41
50
  click.echo(FeedbackManager.highlight_building_project())
42
51
  process(project=project, tb_client=tb_client, watch=False)
43
52
  if watch:
@@ -424,6 +424,14 @@ async def _analyze(filename: str, client: TinyB, format: str, connector: Optiona
424
424
  return meta, data
425
425
 
426
426
 
427
+ async def analyze_file(filename: str, client: TinyB, format: str):
428
+ meta, data = await _analyze(filename, client, format)
429
+ schema = meta["analysis"]["schema"]
430
+ schema = schema.replace(", ", ",\n ")
431
+ content = f"""DESCRIPTION >\n Generated from {filename}\n\nSCHEMA >\n {schema}"""
432
+ return content
433
+
434
+
427
435
  async def _generate_datafile(
428
436
  filename: str,
429
437
  client: TinyB,
@@ -971,7 +979,7 @@ async def push_data(
971
979
  cb.prev_done = 0 # type: ignore[attr-defined]
972
980
 
973
981
  if not silent:
974
- click.echo(FeedbackManager.gray(message=f"\nImporting data to {datasource_name}..."))
982
+ click.echo(FeedbackManager.highlight(message=f"\ Appending data to {datasource_name}..."))
975
983
 
976
984
  if isinstance(url, list):
977
985
  urls = url
@@ -1882,15 +1890,19 @@ def get_gcs_connection_name(project_folder) -> str:
1882
1890
  return get_connection_name(project_folder=project_folder, connection_type="GCS")
1883
1891
 
1884
1892
 
1885
- def get_connection_name(project_folder: str, connection_type: str) -> str:
1886
- connection_name = None
1893
+ def get_kafka_connection_name(project_folder: str, connection_name: Optional[str] = None) -> str:
1894
+ return get_connection_name(project_folder=project_folder, connection_type="KAFKA", connection_name=connection_name)
1895
+
1896
+
1897
+ def get_connection_name(project_folder: str, connection_type: str, connection_name: Optional[str] = None) -> str:
1887
1898
  valid_pattern = r"^[a-zA-Z][a-zA-Z0-9_]*$"
1888
1899
 
1889
1900
  while not connection_name:
1901
+ short_id = str(uuid.uuid4())[:4]
1890
1902
  connection_name = click.prompt(
1891
- f"🔗 Enter a name for your new Tinybird {connection_type} connection (use alphanumeric characters, and underscores)",
1892
- prompt_suffix="\n> ",
1903
+ "Enter a name (only alphanumeric characters and underscores)",
1893
1904
  show_default=True,
1905
+ default=f"{connection_type.lower()}_{short_id}",
1894
1906
  )
1895
1907
  assert isinstance(connection_name, str)
1896
1908
 
@@ -18,6 +18,7 @@ from tinybird.tb.modules.common import (
18
18
  echo_safe_humanfriendly_tables_format_smart_table,
19
19
  get_gcs_connection_name,
20
20
  get_gcs_svc_account_creds,
21
+ get_kafka_connection_name,
21
22
  get_s3_connection_name,
22
23
  production_aws_iamrole_only,
23
24
  run_aws_iamrole_connection_flow,
@@ -26,6 +27,7 @@ from tinybird.tb.modules.common import (
26
27
  from tinybird.tb.modules.create import (
27
28
  generate_aws_iamrole_connection_file_with_secret,
28
29
  generate_gcs_connection_file_with_secrets,
30
+ generate_kafka_connection_with_secrets,
29
31
  )
30
32
  from tinybird.tb.modules.feedback_manager import FeedbackManager
31
33
  from tinybird.tb.modules.project import Project
@@ -275,3 +277,21 @@ async def connection_create_gcs(ctx: Context) -> None:
275
277
  connection_path=connection_path,
276
278
  )
277
279
  )
280
+
281
+
282
+ @connection_create.command(name="kafka", short_help="Creates a Kafka connection.")
283
+ @click.option("--name", help="The name of the connection")
284
+ @click.pass_context
285
+ @coro
286
+ async def connection_create_kafka(ctx: Context, name: Optional[str] = None) -> None:
287
+ """
288
+ Creates a Kafka connection.
289
+
290
+ \b
291
+ $ tb connection create kafka
292
+ """
293
+ click.echo(FeedbackManager.highlight(message="» Creating Kafka connection..."))
294
+ project: Project = ctx.ensure_object(dict)["project"]
295
+ name = get_kafka_connection_name(project.folder, name)
296
+ await generate_kafka_connection_with_secrets(name=name, folder=project.folder)
297
+ click.echo(FeedbackManager.success(message="✓ Done!"))
@@ -409,10 +409,14 @@ def generate_connection_file(name: str, content: str, folder: str, skip_feedback
409
409
 
410
410
 
411
411
  async def generate_aws_iamrole_connection_file_with_secret(
412
- name: str, service: str, role_arn_secret_name: str, region: str, folder: str
412
+ name: str, service: str, role_arn_secret_name: str, region: str, folder: str, with_default_secret: bool = False
413
413
  ) -> Path:
414
+ if with_default_secret:
415
+ default_secret = ', "arn:aws:iam::123456789012:role/my-role"'
416
+ else:
417
+ default_secret = ""
414
418
  content = f"""TYPE {service}
415
- S3_ARN {{{{ tb_secret("{role_arn_secret_name}") }}}}
419
+ S3_ARN {{{{ tb_secret("{role_arn_secret_name}"{default_secret}) }}}}
416
420
  S3_REGION {region}
417
421
  """
418
422
  file_path = generate_connection_file(name, content, folder, skip_feedback=True)
@@ -483,6 +487,7 @@ async def create_resources_from_data(
483
487
  data: str,
484
488
  project: Project,
485
489
  config: Dict[str, Any],
490
+ skip_pipes: bool = False,
486
491
  ) -> List[Path]:
487
492
  local_client = await get_tinybird_local_client(config)
488
493
  folder_path = project.path
@@ -495,7 +500,7 @@ async def create_resources_from_data(
495
500
  result.append(ds_file)
496
501
  name = ds_file.stem
497
502
  no_pipes = len(project.get_pipe_files()) == 0
498
- if no_pipes:
503
+ if not skip_pipes and no_pipes:
499
504
  pipe_file = generate_pipe_file(
500
505
  f"{name}_endpoint",
501
506
  f"""
@@ -510,7 +515,9 @@ TYPE ENDPOINT
510
515
  return result
511
516
 
512
517
 
513
- async def create_resources_from_url(url: str, project: Project, config: Dict[str, Any]) -> List[Path]:
518
+ async def create_resources_from_url(
519
+ url: str, project: Project, config: Dict[str, Any], skip_pipes: bool = False
520
+ ) -> List[Path]:
514
521
  result: List[Path] = []
515
522
  local_client = await get_tinybird_local_client(config)
516
523
  format = url.split(".")[-1]
@@ -518,7 +525,7 @@ async def create_resources_from_url(url: str, project: Project, config: Dict[str
518
525
  result.append(ds_file)
519
526
  name = ds_file.stem
520
527
  no_pipes = len(project.get_pipe_files()) == 0
521
- if no_pipes:
528
+ if not skip_pipes and no_pipes:
522
529
  pipe_file = generate_pipe_file(
523
530
  f"{name}_endpoint",
524
531
  f"""
@@ -531,3 +538,14 @@ TYPE ENDPOINT
531
538
  )
532
539
  result.append(pipe_file)
533
540
  return result
541
+
542
+
543
+ async def generate_kafka_connection_with_secrets(name: str, folder: str) -> Path:
544
+ content = """TYPE kafka
545
+ KAFKA_BOOTSTRAP_SERVERS {{ tb_secret("KAFKA_SERVERS", "localhost:9092") }}
546
+ KAFKA_SECURITY_PROTOCOL SASL_SSL
547
+ KAFKA_SASL_MECHANISM PLAIN
548
+ KAFKA_KEY {{ tb_secret("KAFKA_USERNAME", "") }}
549
+ KAFKA_SECRET {{ tb_secret("KAFKA_PASSWORD", "") }}
550
+ """
551
+ return generate_connection_file(name, content, folder, skip_feedback=True)