tinybird 0.0.1.dev189__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.
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/client.py +1 -5
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/common.py +17 -5
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/connection.py +20 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/create.py +23 -5
- tinybird-0.0.1.dev190/tinybird/tb/modules/datasource.py +904 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/project.py +33 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird.egg-info/PKG-INFO +1 -1
- tinybird-0.0.1.dev189/tinybird/tb/modules/datasource.py +0 -475
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/setup.cfg +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/datafile.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/common.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev189 → tinybird-0.0.1.dev190}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -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.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]:
|
|
@@ -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.
|
|
982
|
+
click.echo(FeedbackManager.highlight(message=f"\n» 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
|
|
1886
|
-
|
|
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
|
-
|
|
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(
|
|
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)
|