tinybird 0.0.1.dev217__tar.gz → 0.0.1.dev221__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.dev217 → tinybird-0.0.1.dev221}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/ch_utils/constants.py +13 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/datafile/common.py +2 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/prompts.py +50 -43
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/create.py +1 -1
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/workspace.py +18 -7
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/setup.cfg +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -242,3 +242,16 @@ FORBIDDEN_SQL_KEYWORDS = {
|
|
|
242
242
|
|
|
243
243
|
CH_SETTINGS_JOIN_ALGORITHM_HASH = "hash" # uses 'hash' by default, https://clickhouse.com/docs/en/operations/settings/settings/#settings-join_algorithm
|
|
244
244
|
CH_SETTINGS_JOIN_ALGORITHM_AUTO = "auto,hash"
|
|
245
|
+
|
|
246
|
+
VALID_QUERY_FORMATS = (
|
|
247
|
+
"JSON",
|
|
248
|
+
"CSV",
|
|
249
|
+
"CSVWithNames",
|
|
250
|
+
"TSV",
|
|
251
|
+
"TSVWithNames",
|
|
252
|
+
"PrettyCompact",
|
|
253
|
+
"JSONEachRow",
|
|
254
|
+
"Parquet",
|
|
255
|
+
"JSONStrings",
|
|
256
|
+
"Prometheus",
|
|
257
|
+
)
|
|
@@ -1710,6 +1710,8 @@ def parse(
|
|
|
1710
1710
|
"s3_access_key": assign_var("s3_access_key"),
|
|
1711
1711
|
"s3_secret": assign_var("s3_secret"),
|
|
1712
1712
|
"gcs_service_account_credentials_json": assign_var_json("gcs_service_account_credentials_json"),
|
|
1713
|
+
"gcs_hmac_access_id": assign_var("gcs_hmac_access_id"),
|
|
1714
|
+
"gcs_hmac_secret": assign_var("gcs_hmac_secret"),
|
|
1713
1715
|
"include": include,
|
|
1714
1716
|
},
|
|
1715
1717
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from datetime import date
|
|
1
2
|
from typing import Optional
|
|
2
3
|
|
|
3
4
|
general_functions = [
|
|
@@ -453,6 +454,8 @@ Use the following format to generate the response and do not wrap it in any othe
|
|
|
453
454
|
|
|
454
455
|
|
|
455
456
|
def mock_prompt(rows: int, feedback: str = "") -> str:
|
|
457
|
+
today = date.today().isoformat()
|
|
458
|
+
|
|
456
459
|
if feedback:
|
|
457
460
|
feedback = f"""In case the <feedback> tag is present and not empty,
|
|
458
461
|
it means there was a previous attempt to generate the resources and the system provided feedback about the previous response.
|
|
@@ -495,6 +498,10 @@ FROM numbers({rows})
|
|
|
495
498
|
- The query MUST return a sample of EXACTLY {rows} rows.
|
|
496
499
|
- The query MUST be valid for clickhouse and Tinybird.
|
|
497
500
|
- FROM numbers({rows}) part is mandatory.
|
|
501
|
+
- If json paths are present (e.g. `userAgent` String `json:$.userAgent`), rely on the json paths to generate the sample record.
|
|
502
|
+
- If the schema has nested json paths (e.g. `json:$.location.country`), generate nested JSON objects accordingly.
|
|
503
|
+
- When working with dates, take into account that the current date is {today}.
|
|
504
|
+
- Use recent dates to avoid generating dates that are too far in the past.
|
|
498
505
|
- Do NOT include ```clickhouse or ```sql or any other wrapping text to the sql query.
|
|
499
506
|
- Do NOT use any of these functions: elementAt
|
|
500
507
|
- Do NOT add a semicolon at the end of the query
|
|
@@ -539,58 +546,55 @@ SELECT
|
|
|
539
546
|
arrayMap(x -> concat('item_', toString(x)), range(1, rand() % 5 + 1)) AS items
|
|
540
547
|
FROM numbers(ROWS)
|
|
541
548
|
|
|
542
|
-
## Example schema with
|
|
549
|
+
## Example schema with nested JSON paths:
|
|
543
550
|
|
|
544
551
|
### Schema:
|
|
545
552
|
|
|
546
553
|
SCHEMA >
|
|
547
|
-
`request_id` String `json:$.request_id`,
|
|
548
554
|
`timestamp` DateTime `json:$.timestamp`,
|
|
549
|
-
`
|
|
550
|
-
`
|
|
551
|
-
`
|
|
552
|
-
`
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
json:$.
|
|
558
|
-
|
|
555
|
+
`location_country` String `json:$.location.country`,
|
|
556
|
+
`location_region` String `json:$.location.region`,
|
|
557
|
+
`location_city` String `json:$.location.city`,
|
|
558
|
+
`location_latitude` String `json:$.location.latitude`,
|
|
559
|
+
`location_longitude` String `json:$.location.longitude`
|
|
560
|
+
|
|
561
|
+
### Important: Understanding JSON paths
|
|
562
|
+
When you see json paths like `json:$.location.country`, it means the data should be structured as nested JSON:
|
|
563
|
+
- `json:$.location.country` → the country field is nested inside the location object
|
|
564
|
+
- `json:$.location.region` → the region field is nested inside the location object
|
|
565
|
+
|
|
566
|
+
### Desired final output structure:
|
|
559
567
|
{{
|
|
560
|
-
"request_id": "req_abc123",
|
|
561
568
|
"timestamp": "2024-11-30T10:30:00.000Z",
|
|
562
|
-
"
|
|
563
|
-
"
|
|
564
|
-
"
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}}
|
|
569
|
+
"location": {{
|
|
570
|
+
"country": "United States",
|
|
571
|
+
"region": "California",
|
|
572
|
+
"city": "San Francisco",
|
|
573
|
+
"latitude": "37.7749",
|
|
574
|
+
"longitude": "-122.4194"
|
|
569
575
|
}}
|
|
570
576
|
}}
|
|
571
577
|
|
|
572
|
-
### Example SQL output
|
|
578
|
+
### Example SQL output for nested JSON paths:
|
|
573
579
|
|
|
574
580
|
SELECT
|
|
575
|
-
request_id,
|
|
576
581
|
timestamp,
|
|
577
582
|
CAST(concat('{{
|
|
578
|
-
"
|
|
579
|
-
"
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}}'), 'JSON') AS request
|
|
583
|
+
"country": "', country, '",
|
|
584
|
+
"region": "', region, '",
|
|
585
|
+
"city": "', city, '",
|
|
586
|
+
"latitude": "', latitude, '",
|
|
587
|
+
"longitude": "', longitude, '"
|
|
588
|
+
}}'), 'JSON') AS location
|
|
585
589
|
FROM
|
|
586
590
|
(
|
|
587
591
|
SELECT
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
['
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
rand()
|
|
592
|
+
now() - rand() % 86400 AS timestamp,
|
|
593
|
+
['United States', 'Canada', 'United Kingdom', 'Germany', 'France'][(rand() % 5) + 1] AS country,
|
|
594
|
+
['California', 'Texas', 'New York', 'Ontario', 'London'][(rand() % 5) + 1] AS region,
|
|
595
|
+
['San Francisco', 'Los Angeles', 'New York', 'Toronto', 'London'][(rand() % 5) + 1] AS city,
|
|
596
|
+
toString(round(rand() * 180 - 90, 4)) AS latitude,
|
|
597
|
+
toString(round(rand() * 360 - 180, 4)) AS longitude
|
|
594
598
|
FROM numbers(ROWS)
|
|
595
599
|
)
|
|
596
600
|
</more_examples>
|
|
@@ -811,14 +815,17 @@ sql_instructions = """
|
|
|
811
815
|
- Do NOT use CREATE TABLE, INSERT INTO, CREATE DATABASE, etc.
|
|
812
816
|
- Use ONLY SELECT statements in the SQL section.
|
|
813
817
|
- INSERT INTO is not supported in SQL section.
|
|
814
|
-
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
818
|
+
- ClickHouse functions supported are:
|
|
819
|
+
- General functions supported are: {general_functions}
|
|
820
|
+
- Character insensitive functions supported are: {general_functions_insensitive}
|
|
821
|
+
- Aggregate functions supported are: {aggregate_functions}
|
|
822
|
+
- How to use ClickHouse supported functions:
|
|
823
|
+
- When using functions try always ClickHouse functions first, then SQL functions.
|
|
824
|
+
- Do not use any ClickHouse function that is not present in the list of general functions, character insensitive functions and aggregate functions.
|
|
825
|
+
- If the function is not present in the list, the sql query will fail, so avoid at all costs to use any function that is not present in the list.
|
|
826
|
+
- When aliasing a column, use first the column name and then the alias.
|
|
827
|
+
- General functions and aggregate functions are case sensitive.
|
|
828
|
+
- Character insensitive functions are case insensitive.
|
|
822
829
|
- Parameters are never quoted in any case.
|
|
823
830
|
- 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
831
|
- 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')
|
|
@@ -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.dev221'
|
|
8
|
+
__revision__ = '8f74332'
|
|
@@ -101,7 +101,7 @@ async def create(
|
|
|
101
101
|
if prompt:
|
|
102
102
|
prompt_result = await create_resources_from_prompt(tb_client, user_token, prompt, project)
|
|
103
103
|
result.extend(prompt_result)
|
|
104
|
-
readme_path =
|
|
104
|
+
readme_path = folder_path / "README.md"
|
|
105
105
|
if readme_path.exists():
|
|
106
106
|
click.echo(FeedbackManager.highlight(message="\n» Updating project description..."))
|
|
107
107
|
else:
|
|
@@ -288,14 +288,25 @@ async def clear_workspace() -> None:
|
|
|
288
288
|
|
|
289
289
|
ws = next((ws for ws in local_workspaces if ws["name"] == ws_name), None)
|
|
290
290
|
|
|
291
|
+
if not ws:
|
|
292
|
+
raise CLIWorkspaceException(FeedbackManager.error(message=f"Workspace '{ws_name}' not found."))
|
|
293
|
+
|
|
294
|
+
requests.delete(f"{TB_LOCAL_ADDRESS}/v1/workspaces/{ws['id']}?token={user_token}&hard_delete_confirmation=yes") # noqa: ASYNC210
|
|
295
|
+
user_workspaces = await user_client.user_workspaces(version="v1")
|
|
296
|
+
ws = next((ws for ws in user_workspaces["workspaces"] if ws["name"] == ws_name), None)
|
|
297
|
+
|
|
291
298
|
if ws:
|
|
292
|
-
|
|
293
|
-
|
|
299
|
+
raise CLIWorkspaceException(
|
|
300
|
+
FeedbackManager.error(message=f"Workspace '{ws_name}' was not cleared properly. Please try again.")
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
await user_client.create_workspace(ws_name, assign_to_organization_id=user_org_id, version="v1")
|
|
304
|
+
user_workspaces = requests.get(f"{TB_LOCAL_ADDRESS}/v1/user/workspaces?token={admin_token}").json() # noqa: ASYNC210
|
|
305
|
+
ws = next((ws for ws in user_workspaces["workspaces"] if ws["name"] == ws_name), None)
|
|
294
306
|
|
|
295
307
|
if not ws:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
308
|
+
raise CLIWorkspaceException(
|
|
309
|
+
FeedbackManager.error(message=f"Workspace '{ws_name}' was not cleared properly. Please try again.")
|
|
310
|
+
)
|
|
299
311
|
|
|
300
|
-
|
|
301
|
-
click.echo(FeedbackManager.success(message=f"\n✓ Workspace '{ws_name}' cleared"))
|
|
312
|
+
click.echo(FeedbackManager.success(message=f"✓ Workspace '{ws_name}' cleared"))
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/datafile/pipe_checker.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb/modules/tinyunit/tinyunit_lib.py
RENAMED
|
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-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev217 → tinybird-0.0.1.dev221}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|