-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5847de8
commit bc1dc3e
Showing
41 changed files
with
489 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from hooli_bi.definitions import defs as defs | ||
from hooli_bi.definitions import defs as defs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
tenant_id=EnvVar("AZURE_POWERBI_TENANT_ID"), | ||
), | ||
workspace_id=EnvVar("AZURE_POWERBI_WORKSPACE_ID"), | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from hooli_data_ingest.definitions import defs as defs | ||
from hooli_data_ingest.definitions import defs as defs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
from dagster_embedded_elt.sling import ( | ||
sling_assets, | ||
SlingResource, | ||
sling_assets, | ||
SlingResource, | ||
) | ||
from dagster_embedded_elt.sling.dagster_sling_translator import DagsterSlingTranslator | ||
|
||
from hooli_data_ingest.resources import replication_config | ||
|
||
|
||
class CustomSlingTranslator(DagsterSlingTranslator): | ||
def __init__(self, target_prefix="RAW_DATA"): | ||
def __init__(self, target_prefix="RAW_DATA"): | ||
super().__init__(target_prefix=target_prefix) | ||
self.replication_config = replication_config | ||
def get_group_name(self, stream_definition): | ||
return "RAW_DATA" | ||
def get_kinds(self, stream_definition): | ||
storage_kind = self.replication_config.get("target", "DUCKDB") | ||
if storage_kind.startswith("SNOWFLAKE"): | ||
|
||
def get_group_name(self, stream_definition): | ||
return "RAW_DATA" | ||
|
||
def get_kinds(self, stream_definition): | ||
storage_kind = self.replication_config.get("target", "DUCKDB") | ||
if storage_kind.startswith("SNOWFLAKE"): | ||
storage_kind = "SNOWFLAKE" | ||
return {"sling",storage_kind} | ||
|
||
return {"sling", storage_kind} | ||
|
||
|
||
@sling_assets( | ||
replication_config=replication_config, | ||
dagster_sling_translator=CustomSlingTranslator(), | ||
replication_config=replication_config, | ||
dagster_sling_translator=CustomSlingTranslator(), | ||
) | ||
def my_sling_assets(context, sling: SlingResource): | ||
yield from sling.replicate(context=context).fetch_column_metadata().fetch_row_count() | ||
for row in sling.stream_raw_logs(): | ||
context.log.info(row) | ||
yield from ( | ||
sling.replicate(context=context).fetch_column_metadata().fetch_row_count() | ||
) | ||
for row in sling.stream_raw_logs(): | ||
context.log.info(row) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.